运动员成绩表格.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>参赛队成绩表格</title>
  6. <link rel="stylesheet" href="static/css/index.css">
  7. <link rel="stylesheet" href="static/eui/element-ui.css">
  8. <script src="static/vue/vue.min.js"></script>
  9. <script src="static/vue/vue-resource.js"></script>
  10. <script src="static/eui/index.js"></script>
  11. <script src="static/comm/Ajax.js"></script>
  12. <script src="js/jquery-3.4.1.min.js"></script>
  13. <link rel="stylesheet" href="css/demo.css">
  14. <script src="js/other.1.js"></script>
  15. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  16. <style type="text/css">
  17. .match-achievement{
  18. margin: 50px 50px;
  19. width:1000px;
  20. }
  21. .match-achievement table{
  22. background:#E0ECFF;
  23. width:100%;
  24. }
  25. .match-achievement td{
  26. background:#fafafa;
  27. text-align:center;
  28. padding:2px;
  29. }
  30. .match-achievement td{
  31. background:#E0ECFF;
  32. }
  33. .match-achievement td.drop{
  34. background:#fafafa;
  35. width:100px;
  36. }
  37. .match-achievement td.over{
  38. background:#FBEC88;
  39. }
  40. .item{
  41. text-align:center;
  42. border:1px solid #499B33;
  43. background:#fafafa;
  44. width:100px;
  45. }
  46. .assigned{
  47. border:1px solid #BC2A4D;
  48. }
  49. .add{
  50. width: 100px;
  51. height: 30px;
  52. }
  53. a{
  54. text-decoration: none;
  55. color: #000000;
  56. }
  57. a:hover{
  58. color: #CC2222;
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. <div id="app">
  64. <div class="match-achievement" >
  65. <h1>运动员成绩表</h1>
  66. <table class="tab" style="table-layout: fixed;width:1200px; ">
  67. <tr style="width: 150px;">
  68. <td>
  69. <a href="#" class="easyui-linkbutton"
  70. data-options="iconCls:'icon-add'" id="add">新增
  71. </a>
  72. <a href="#" class="easyui-linkbutton"
  73. data-options="iconCls:'icon-edit'" id="edit">编辑
  74. </a>
  75. <a href="#" class="easyui-linkbutton"
  76. data-options="iconCls:'icon-cancel'" id="del">删除
  77. </a>
  78. </td>
  79. <td>参赛者数据id</td>
  80. <td style="width: 128px;">编号(学生号/职工号)</td>
  81. <td>姓名</td>
  82. <td>参赛者类型</td>
  83. <td>学院</td>
  84. <td>项目类型</td>
  85. <td>赛组</td>
  86. <td>性别</td>
  87. <td style="width: 80px;">项目</td>
  88. <td style="width: 70px;">比赛时间</td>
  89. <td>比赛日期</td>
  90. <td>成绩</td>
  91. </tr>
  92. <tr v-for="c1 in c1s">
  93. <td class="drop"><input type="checkbox"></td>
  94. <td class="drop">{{c1.id}}</td>
  95. <td class="drop">{{c1.pid}}</td>
  96. <td class="drop">{{c1.name}}</td>
  97. <td class="drop">{{c1.type}}</td>
  98. <td class="drop">{{c1.sportsgroup.name}}</td>
  99. <td class="drop">{{c1.sportsitems.department}}</td>
  100. <td class="drop">{{c1.gid}}</td>
  101. <td class="drop"><samp v-if="c1.sportsitems.gender=='a'">综合</samp>
  102. <samp v-if ="c1.sportsitems.gender=='m'">男</samp>
  103. <samp v-if ="c1.sportsitems.gender=='f'">女</samp></td>
  104. <td class="drop" style="width: 70px;">{{c1.sportsitems.name}}</td>
  105. <td class="drop" style="width: 52px; white-space: nowrap;overflow: hidden; font-size: 13px; ">{{c1.gamedate}}</td>
  106. <td class="drop">{{c1.gametime}}</td>
  107. <td class="drop">{{c1.grade}}</td>
  108. </tr>
  109. </table>
  110. </div>
  111. <!--输入框-->
  112. <div class="inp">
  113. <h3>新增</h3>
  114. <form method="post">
  115. 报名者id:<input id="addpid" type="text" name="title"><br>
  116. 报名者姓名:<input id="addname" type="text" name="sotr"><br>
  117. 报名者类型:<input id="addtype" type="text" name="sotr"><br>
  118. 项目id:<input id="addsid" type="text" name="title"><br>
  119. 参赛对号:<input id="addtid" type="text" name="sotr"><br>
  120. 参赛组号:<input id="addgid" type="text" name="title"><br>
  121. 比赛日期:<input id="addgamedate" type="text" name="sotr" placeholder="时间格式:yyyy-mm-dd" value="2018-12-12"><br>
  122. 比赛时间:<input id="addgametime" type="text" name="sotr"><br>
  123. 报名日期:<input id="addenterdate" type="text" name="title" placeholder="时间格式:yyyy-mm-dd" value="2018-12-12"><br>
  124. 报名时间:<input id="addentertime" type="text" name="title"><br>
  125. 分数:<input id="addgrade" type="text" name="sotr"><br>
  126. </form>
  127. <button value="按钮" id="findAll" @click="onSubmit1">添加</button>
  128. </div>
  129. <div class="editinp">
  130. <h3>编辑 </h3>
  131. <form method="post">
  132. id:<input id="gaiid" type="text" name="id"><br>
  133. 报名者id:<input id="gaipid" type="text" name="title"><br>
  134. 报名者姓名:<input id="gainame" type="text" name="sotr"><br>
  135. 报名者类型:<input id="gaitype" type="text" name="sotr"><br>
  136. 项目id:<input id="gaisid" type="text" name="title"><br>
  137. 参赛对号:<input id="gaitid" type="text" name="sotr"><br>
  138. 参赛组号:<input id="gaigid" type="text" name="title"><br>
  139. 比赛日期:<input id="gaigamedate" type="text" name="sotr" placeholder="时间格式:yyyy-mm-dd" value="2018-12-12"><br>
  140. 比赛时间:<input id="gaigametime" type="text" name="sotr"><br>
  141. 报名日期:<input id="gaienterdate" type="text" name="title" placeholder="时间格式:yyyy-mm-dd" value="2018-12-12"><br>
  142. 报名时间:<input id="gaientertime" type="text" name="title"><br>
  143. 分数:<input id="gaigrade" type="text" name="sotr"><br>
  144. </form>
  145. <button value="按钮" id="findAll2" @click="onSubmit2">修改</button>
  146. </div>
  147. <div class="delinp">
  148. <h3>删除 </h3>
  149. <form method="post">
  150. id: <input type="text" id="shanid" name="id"><br>
  151. </form>
  152. <button value="按钮" id="findAll3" @click="onSubmit3">删除</button>
  153. </div>
  154. </div>
  155. </body>
  156. <script>
  157. new Vue({
  158. el: '#app',
  159. data() {
  160. return {
  161. c1s: [],
  162. listLoading:false,
  163. }
  164. },
  165. created() {
  166. this.ajax = new Ajax(this);
  167. this.getSportsitems_peopleController();
  168. },
  169. methods: {
  170. //通过ajax去请求服务端,获取数据
  171. getSportsitems_peopleController() {
  172. let that = this;
  173. let url = "Sportsitems_peopleController/findAllda";
  174. //调用Ajax的get方法
  175. that.ajax.get(url, function (rs) {
  176. that.c1s = rs;
  177. });
  178. },
  179. //通过ajax去请求服务端,获取数据
  180. getSportsitems_peopleController1() {
  181. var pid2 = $("#addpid").val();
  182. var type2 = $("#addtype").val();
  183. var name2 = $("#addname").val();
  184. var sid2 = $("#addsid").val();
  185. var tid2 = $("#addtid").val();
  186. var gid2 = $("#addgid").val();
  187. var gamedate2 = $("#addgamedate").val();
  188. var gametime2 = $("#addgametime").val();
  189. var enterdate2 = $("#addenterdate").val();
  190. var entertime2 = $("#addentertime").val();
  191. var grade2 = $("#addgrade").val();
  192. axios.post('http://localhost:8199/Sportsitems_peopleController/save', {
  193. pid : pid2,
  194. type : type2,
  195. name : name2,
  196. sid : sid2,
  197. tid : tid2,
  198. gid : gid2,
  199. gamedate : gamedate2,
  200. gametime : gametime2,
  201. enterdate : enterdate2,
  202. entertime : entertime2,
  203. grade : grade2
  204. }).then(function (response) {
  205. location.reload();
  206. console.log(response);
  207. }).catch(function (error) {
  208. console.log(error);
  209. });
  210. },
  211. getSportsitems_peopleController2() {
  212. var id2 =$("#gaiid").val();
  213. var pid2 = $("#gaipid").val();
  214. var type2 = $("#gaitype").val();
  215. var name2 = $("#gainame").val();
  216. var sid2 = $("#gaisid").val();
  217. var tid2 = $("#gaitid").val();
  218. var gid2 = $("#gaigid").val();
  219. var gamedate2 = $("#gaigamedate").val();
  220. var gametime2 = $("#gaigametime").val();
  221. var enterdate2 = $("#gaienterdate").val();
  222. var entertime2 = $("#gaientertime").val();
  223. var grade2 = $("#gaigrade").val();
  224. axios.post('http://localhost:8199/Sportsitems_peopleController/update', {
  225. id : id2,
  226. pid : pid2,
  227. type : type2,
  228. name : name2,
  229. sid : sid2,
  230. tid : tid2,
  231. gid : gid2,
  232. gamedate : gamedate2,
  233. gametime : gametime2,
  234. enterdate : enterdate2,
  235. entertime : entertime2,
  236. grade : grade2
  237. }).then(function (response) {
  238. location.reload();
  239. console.log(response);
  240. }).catch(function (error) {
  241. console.log(error);
  242. });
  243. },
  244. getSportsitems_peopleController3() {
  245. var id2 =$("#shanid").val();
  246. axios.post('http://localhost:8199/Sportsitems_peopleController/delete', {
  247. id: id2
  248. }).then(function (response) {
  249. location.reload();
  250. console.log(response);
  251. }).catch(function (error) {
  252. console.log(error);
  253. });
  254. },
  255. onSubmit1() {
  256. let that = this;
  257. that.getSportsitems_peopleController1()
  258. },
  259. onSubmit2() {
  260. let that = this;
  261. that.getSportsitems_peopleController2()
  262. },
  263. onSubmit3() {
  264. let that = this;
  265. that.getSportsitems_peopleController3();
  266. created();
  267. },
  268. }
  269. })
  270. </script>
  271. </html>