瀏覽代碼

Merge branch 'iteration_201225' into online

lex-xin 4 年之前
父節點
當前提交
d9eb1d3566
共有 1 個文件被更改,包括 15 次插入4 次删除
  1. 15 4
      src/views/luckyDraw/lotteryRecord.vue

+ 15 - 4
src/views/luckyDraw/lotteryRecord.vue

@@ -8,12 +8,11 @@
         <save-form :inline="true"
                 class="searchForm"
                 ref="searchForm"
-                @submit="getList"
+                @submit="search"
                 @reset="onReset"
                 :model="searchForm">
             <el-form-item prop="userId">
-                <el-input v-model.trim="searchForm.userId" clearable
-                        placeholder="请输入学生编号"></el-input>
+                <el-input v-model.number="searchForm.userId" maxlength="9" clearable placeholder="请输入学生编号" type="number"></el-input>
             </el-form-item>
             <el-form-item prop="name">
                 <el-input v-model.trim="searchForm.name" clearable
@@ -55,7 +54,11 @@
                         :header-cell-style="{background:'#EDEEF0',color:'#444'}">
                 <el-table-column align="center"
                                 prop="userId"
-                                label="学员编号"></el-table-column>
+                                label="学员编号">
+                    <template slot-scope="scope">
+                        <copy-text>{{ scope.row.userId }}</copy-text>
+                    </template>
+                </el-table-column>
                 <el-table-column align="center"
                                 prop="user.username"
                                 label="学员姓名"></el-table-column>
@@ -68,6 +71,9 @@
                 <el-table-column align="center"
                                 prop="luckDrawPrize.name"
                                 label="奖项">
+                    <template slot-scope="scope">
+                        <copy-text>{{ scope.row.luckDrawPrize.name }}</copy-text>
+                    </template>
                 </el-table-column>
                 <el-table-column align="center"
                                 prop="createOn"
@@ -145,11 +151,16 @@ export default {
                 }
             })
         },
+        search() {
+            this.pageInfo.page = 1
+            this.getList()
+        },
         onReset() {
             this.$refs.searchForm.resetFields()
             this.time = null
             this.searchForm.startDate = null
             this.searchForm.endDate = null
+            this.pageInfo.page = 1
             this.getList()
         }
     }