123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>参赛队成绩表格</title>
- <link rel="stylesheet" href="static/css/index.css">
- <link rel="stylesheet" href="static/eui/element-ui.css">
- <script src="static/vue/vue.min.js"></script>
- <script src="static/vue/vue-resource.js"></script>
- <script src="static/eui/index.js"></script>
- <script src="static/comm/Ajax.js"></script>
- <script src="js/jquery-3.4.1.min.js"></script>
- <link rel="stylesheet" href="css/demo.css">
- <script src="js/other.1.js"></script>
- <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
- <style type="text/css">
- .match-achievement{
- margin: 50px 50px;
- width:1000px;
- }
- .match-achievement table{
- background:#E0ECFF;
- width:100%;
- }
- .match-achievement td{
- background:#fafafa;
- text-align:center;
- padding:2px;
- }
- .match-achievement td{
- background:#E0ECFF;
- }
- .match-achievement td.drop{
- background:#fafafa;
- width:100px;
- }
- .match-achievement td.over{
- background:#FBEC88;
- }
- .item{
- text-align:center;
- border:1px solid #499B33;
- background:#fafafa;
- width:100px;
- }
- .assigned{
- border:1px solid #BC2A4D;
- }
- .add{
- width: 100px;
- height: 30px;
- }
- a{
- text-decoration: none;
- color: #000000;
- }
- a:hover{
- color: #CC2222;
- }
- </style>
- </head>
- <body>
- <div id="app">
- <div class="match-achievement" >
- <h1>运动员成绩表</h1>
- <table class="tab" style="table-layout: fixed;width:1200px; ">
- <tr style="width: 150px;">
- <td>
- <a href="#" class="easyui-linkbutton"
- data-options="iconCls:'icon-add'" id="add">新增
- </a>
- <a href="#" class="easyui-linkbutton"
- data-options="iconCls:'icon-edit'" id="edit">编辑
- </a>
- <a href="#" class="easyui-linkbutton"
- data-options="iconCls:'icon-cancel'" id="del">删除
- </a>
- </td>
- <td>参赛者数据id</td>
- <td style="width: 128px;">编号(学生号/职工号)</td>
- <td>姓名</td>
- <td>参赛者类型</td>
- <td>学院</td>
- <td>项目类型</td>
- <td>赛组</td>
- <td>性别</td>
- <td style="width: 80px;">项目</td>
- <td style="width: 70px;">比赛时间</td>
- <td>比赛日期</td>
- <td>成绩</td>
- </tr>
- <tr v-for="c1 in c1s">
- <td class="drop"><input type="checkbox"></td>
- <td class="drop">{{c1.id}}</td>
- <td class="drop">{{c1.pid}}</td>
- <td class="drop">{{c1.name}}</td>
- <td class="drop">{{c1.type}}</td>
- <td class="drop">{{c1.sportsgroup.name}}</td>
- <td class="drop">{{c1.sportsitems.department}}</td>
- <td class="drop">{{c1.gid}}</td>
- <td class="drop"><samp v-if="c1.sportsitems.gender=='a'">综合</samp>
- <samp v-if ="c1.sportsitems.gender=='m'">男</samp>
- <samp v-if ="c1.sportsitems.gender=='f'">女</samp></td>
- <td class="drop" style="width: 70px;">{{c1.sportsitems.name}}</td>
- <td class="drop" style="width: 52px; white-space: nowrap;overflow: hidden; font-size: 13px; ">{{c1.gamedate}}</td>
- <td class="drop">{{c1.gametime}}</td>
- <td class="drop">{{c1.grade}}</td>
-
- </tr>
- </table>
- </div>
-
- <!--输入框-->
- <div class="inp">
- <h3>新增</h3>
- <form method="post">
- 报名者id:<input id="addpid" type="text" name="title"><br>
- 报名者姓名:<input id="addname" type="text" name="sotr"><br>
- 报名者类型:<input id="addtype" type="text" name="sotr"><br>
- 项目id:<input id="addsid" type="text" name="title"><br>
- 参赛对号:<input id="addtid" type="text" name="sotr"><br>
- 参赛组号:<input id="addgid" type="text" name="title"><br>
- 比赛日期:<input id="addgamedate" type="text" name="sotr" placeholder="时间格式:yyyy-mm-dd" value="2018-12-12"><br>
- 比赛时间:<input id="addgametime" type="text" name="sotr"><br>
- 报名日期:<input id="addenterdate" type="text" name="title" placeholder="时间格式:yyyy-mm-dd" value="2018-12-12"><br>
- 报名时间:<input id="addentertime" type="text" name="title"><br>
- 分数:<input id="addgrade" type="text" name="sotr"><br>
-
- </form>
- <button value="按钮" id="findAll" @click="onSubmit1">添加</button>
-
- </div>
- <div class="editinp">
- <h3>编辑 </h3>
- <form method="post">
- id:<input id="gaiid" type="text" name="id"><br>
- 报名者id:<input id="gaipid" type="text" name="title"><br>
- 报名者姓名:<input id="gainame" type="text" name="sotr"><br>
- 报名者类型:<input id="gaitype" type="text" name="sotr"><br>
- 项目id:<input id="gaisid" type="text" name="title"><br>
- 参赛对号:<input id="gaitid" type="text" name="sotr"><br>
- 参赛组号:<input id="gaigid" type="text" name="title"><br>
- 比赛日期:<input id="gaigamedate" type="text" name="sotr" placeholder="时间格式:yyyy-mm-dd" value="2018-12-12"><br>
- 比赛时间:<input id="gaigametime" type="text" name="sotr"><br>
- 报名日期:<input id="gaienterdate" type="text" name="title" placeholder="时间格式:yyyy-mm-dd" value="2018-12-12"><br>
- 报名时间:<input id="gaientertime" type="text" name="title"><br>
- 分数:<input id="gaigrade" type="text" name="sotr"><br>
-
- </form>
- <button value="按钮" id="findAll2" @click="onSubmit2">修改</button>
-
- </div>
- <div class="delinp">
- <h3>删除 </h3>
- <form method="post">
- id: <input type="text" id="shanid" name="id"><br>
- </form>
- <button value="按钮" id="findAll3" @click="onSubmit3">删除</button>
- </div>
-
- </div>
- </body>
-
- <script>
- new Vue({
- el: '#app',
- data() {
- return {
- c1s: [],
- listLoading:false,
- }
- },
- created() {
- this.ajax = new Ajax(this);
- this.getSportsitems_peopleController();
- },
- methods: {
-
- //通过ajax去请求服务端,获取数据
- getSportsitems_peopleController() {
- let that = this;
- let url = "Sportsitems_peopleController/findAllda";
- //调用Ajax的get方法
- that.ajax.get(url, function (rs) {
- that.c1s = rs;
- });
- },
-
- //通过ajax去请求服务端,获取数据
- getSportsitems_peopleController1() {
- var pid2 = $("#addpid").val();
- var type2 = $("#addtype").val();
- var name2 = $("#addname").val();
- var sid2 = $("#addsid").val();
- var tid2 = $("#addtid").val();
- var gid2 = $("#addgid").val();
- var gamedate2 = $("#addgamedate").val();
- var gametime2 = $("#addgametime").val();
- var enterdate2 = $("#addenterdate").val();
- var entertime2 = $("#addentertime").val();
- var grade2 = $("#addgrade").val();
-
-
-
- axios.post('http://localhost:8199/Sportsitems_peopleController/save', {
- pid : pid2,
- type : type2,
- name : name2,
- sid : sid2,
- tid : tid2,
- gid : gid2,
- gamedate : gamedate2,
- gametime : gametime2,
- enterdate : enterdate2,
- entertime : entertime2,
- grade : grade2
-
- }).then(function (response) {
- location.reload();
- console.log(response);
- }).catch(function (error) {
- console.log(error);
- });
-
- },
-
- getSportsitems_peopleController2() {
- var id2 =$("#gaiid").val();
- var pid2 = $("#gaipid").val();
- var type2 = $("#gaitype").val();
- var name2 = $("#gainame").val();
- var sid2 = $("#gaisid").val();
- var tid2 = $("#gaitid").val();
- var gid2 = $("#gaigid").val();
- var gamedate2 = $("#gaigamedate").val();
- var gametime2 = $("#gaigametime").val();
- var enterdate2 = $("#gaienterdate").val();
- var entertime2 = $("#gaientertime").val();
- var grade2 = $("#gaigrade").val();
-
-
- axios.post('http://localhost:8199/Sportsitems_peopleController/update', {
- id : id2,
- pid : pid2,
- type : type2,
- name : name2,
- sid : sid2,
- tid : tid2,
- gid : gid2,
- gamedate : gamedate2,
- gametime : gametime2,
- enterdate : enterdate2,
- entertime : entertime2,
- grade : grade2
- }).then(function (response) {
- location.reload();
- console.log(response);
- }).catch(function (error) {
- console.log(error);
- });
-
- },
-
- getSportsitems_peopleController3() {
- var id2 =$("#shanid").val();
- axios.post('http://localhost:8199/Sportsitems_peopleController/delete', {
- id: id2
- }).then(function (response) {
- location.reload();
- console.log(response);
- }).catch(function (error) {
- console.log(error);
- });
-
- },
-
-
- onSubmit1() {
- let that = this;
- that.getSportsitems_peopleController1()
- },
- onSubmit2() {
- let that = this;
- that.getSportsitems_peopleController2()
- },
-
- onSubmit3() {
-
- let that = this;
- that.getSportsitems_peopleController3();
- created();
- },
-
- }
- })
- </script>
- </html>
|