ソースを参照

报名详情页添加

user5 2 年 前
コミット
ffc478d8f9

+ 8 - 0
api/test/luckyDraw/LuckyDrawService.js

@@ -48,4 +48,12 @@ export default class LuckyDrawService {
       params: {id: id,number: number,awardId: awardId}
     })
   }
+
+  appShowList (params) {
+    return request({
+      url: '/luckyDraw/member/appShowList',
+      method: 'get',
+      params: params
+    })
+  }
 }

+ 93 - 0
pages/test/luckyDraw/LuckyDrawMemberList.vue

@@ -0,0 +1,93 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-blue" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content"> 报名信息</block>
+		</cu-custom>
+		<view>
+			<view class="uni-container">
+				<uni-table ref="table" :loading="loading" stripe  emptyText="暂无更多数据" @selection-change="selectionChange">
+					<uni-tr >
+						<uni-th @filter-change="searchChangeHandle"   field="awardsName" @sort-change="sortChangeHandle"  align="center">姓名</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="prizeName" @sort-change="sortChangeHandle"  align="center">部门</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="number"  @sort-change="sortChangeHandle"  align="center">手机号</uni-th>
+					</uni-tr>
+					<uni-tr v-for="(row, index) in dataList" :key="index">
+						<uni-td align="center">{{row.name}}</uni-td>
+						<uni-td align="center">{{row.officeName}}</uni-td>
+						<uni-td align="center">{{row.phone}}</uni-td>
+					</uni-tr>
+				</uni-table>
+			</view>
+		</view>
+		</view>
+</template>
+
+<script>
+  import uniFab from '@/components/uni-fab/uni-fab.vue';
+  import TestMobileService from '@/api/test/luckyDraw/LuckyDrawService'
+  export default {
+	onShow(option) {
+		
+	},
+	components:{
+		uniFab
+	},
+    data () {
+      return {
+        searchForm: {},
+        dataList: [], // 数据列表
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    testMobileService: null,
+	onLoad(option) {
+	  this.testMobileService = new TestMobileService()
+			let { eventId } = option
+	  this.refreshList(eventId)
+	},
+    methods: {
+	  /*获取数据列表 */
+	  refreshList(eventId) {
+	    this.loading = true
+	    this.testMobileService.appShowList({
+	  	  'current': this.tablePage.currentPage,
+	  	  'size': this.tablePage.pageSize,
+	  	  'orders': this.tablePage.orders,
+	  	  'eventId': eventId,
+	  	  ...this.searchForm
+	  	}).then(({data}) => {
+	  	  this.dataList = data.records
+	  	  this.tablePage.total = data.total
+	  	  this.loading = false
+	  	})
+	  	
+	  },
+	  // 排序
+	  sortChangeHandle (column) {
+	  	this.tablePage.orders = []
+	  	if (column.order != null) {
+	  	  this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'ascending'})
+	  	}
+	  	this.refreshList()
+	  },
+	// 检索
+	  searchChangeHandle (column) {
+		this.searchForm[column.property] = column.filter
+		this.refreshList()
+	  },
+	// 分页触发
+	  currentChangeHandle (e) {
+		this.tablePage.currentPage = e.current
+		this.refreshList()
+	  }
+    }
+  }
+</script>
+