|
@@ -0,0 +1,107 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="main-contain">
|
|
3
|
+ <div class="position">
|
|
4
|
+ <bread-crumb :crumbs="crumbs"></bread-crumb>
|
|
5
|
+ </div>
|
|
6
|
+ <div class="app-container" style="padding-top: 0; background-color: #f6f8f9;">
|
|
7
|
+ <div style="display: flex;">
|
|
8
|
+ <div style="flex: 1;">
|
|
9
|
+ <router-link to="/activity/list">
|
|
10
|
+ <el-button type="primary">返回列表</el-button>
|
|
11
|
+ </router-link>
|
|
12
|
+ </div>
|
|
13
|
+ <el-button type="primary" @click="printAction">导出</el-button>
|
|
14
|
+ </div>
|
|
15
|
+ <div style="margin-top: 10px;" id="table-panel">
|
|
16
|
+ <el-table id="table" border :data="signup_users" empty-text="暂无人报名">
|
|
17
|
+ <el-table-column label="报名号" align="center" prop="id"></el-table-column>
|
|
18
|
+ <el-table-column label="手机号" align="center" prop="mobile"></el-table-column>
|
|
19
|
+ <el-table-column label="客户姓名" align="center" prop="real_name"></el-table-column>
|
|
20
|
+ <el-table-column label="报名时间" align="center">
|
|
21
|
+ <template slot-scope="scope">
|
|
22
|
+ <span>{{ parseTime(scope.row.ctime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
|
23
|
+ </template>
|
|
24
|
+ </el-table-column>
|
|
25
|
+ </el-table>
|
|
26
|
+ </div>
|
|
27
|
+ <div style="margin-top: 10px;">
|
|
28
|
+ <el-pagination :total="total" :current-page.sync="current_page" :page-size="10" layout="total, prev, pager, next" @current-change="getActivities()"></el-pagination>
|
|
29
|
+ </div>
|
|
30
|
+ <div id="print-table" style="width:960px; display: none;">
|
|
31
|
+ <el-table border :data="signup_users" empty-text="暂无人报名">
|
|
32
|
+ <el-table-column label="报名号" align="center" prop="id"></el-table-column>
|
|
33
|
+ <el-table-column label="手机号" align="center" prop="mobile"></el-table-column>
|
|
34
|
+ <el-table-column label="客户姓名" align="center" prop="real_name"></el-table-column>
|
|
35
|
+ <el-table-column label="报名时间" align="center">
|
|
36
|
+ <template slot-scope="scope">
|
|
37
|
+ <span>{{ parseTime(scope.row.ctime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
|
38
|
+ </template>
|
|
39
|
+ </el-table-column>
|
|
40
|
+ </el-table>
|
|
41
|
+ </div>
|
|
42
|
+ </div>
|
|
43
|
+ </div>
|
|
44
|
+</template>
|
|
45
|
+
|
|
46
|
+<script>
|
|
47
|
+import BreadCrumb from "@/scrm_pages/components/bread-crumb"
|
|
48
|
+import { fetchActivitySignupUsers } from "@/api/activity/activity"
|
|
49
|
+import { parseTime } from "@/utils"
|
|
50
|
+import printJS from "print-js"
|
|
51
|
+
|
|
52
|
+export default {
|
|
53
|
+ name: "ActivitySignupUsers",
|
|
54
|
+ components: {
|
|
55
|
+ BreadCrumb,
|
|
56
|
+ },
|
|
57
|
+ data() {
|
|
58
|
+ return {
|
|
59
|
+ crumbs: [
|
|
60
|
+ { path: false, name: "活动详情" },
|
|
61
|
+ { path: false, name: "报名列表" },
|
|
62
|
+ ],
|
|
63
|
+
|
|
64
|
+ activity_id: 0,
|
|
65
|
+
|
|
66
|
+ signup_users: [],
|
|
67
|
+ loading_search: false,
|
|
68
|
+ total: 0,
|
|
69
|
+ current_page: 1,
|
|
70
|
+ }
|
|
71
|
+ },
|
|
72
|
+ mounted() {
|
|
73
|
+ this.activity_id = this.$route.query.id
|
|
74
|
+
|
|
75
|
+ this.fetchSignupUsers()
|
|
76
|
+ },
|
|
77
|
+ methods: {
|
|
78
|
+ parseTime,
|
|
79
|
+ fetchSignupUsers: function() {
|
|
80
|
+ this.loading_search = true
|
|
81
|
+ fetchActivitySignupUsers(this.activity_id, "", this.current_page).then(rs => {
|
|
82
|
+ this.loading_search = false
|
|
83
|
+ var resp = rs.data
|
|
84
|
+ if (resp.state == 1) {
|
|
85
|
+ this.signup_users = resp.data.users
|
|
86
|
+ this.total = resp.data.total
|
|
87
|
+ } else {
|
|
88
|
+ this.$message.error(resp.msg)
|
|
89
|
+ }
|
|
90
|
+ }).catch(err => {
|
|
91
|
+ this.loading_search = false
|
|
92
|
+ this.$message.error(err)
|
|
93
|
+ })
|
|
94
|
+ },
|
|
95
|
+ printAction: function() {
|
|
96
|
+ printJS({
|
|
97
|
+ printable: 'table',
|
|
98
|
+ type: "html",
|
|
99
|
+ scanStyles: false,
|
|
100
|
+ css: ['https://unpkg.com/element-ui/lib/theme-chalk/index.css'],
|
|
101
|
+ // maxWidth: 960,
|
|
102
|
+ })
|
|
103
|
+ },
|
|
104
|
+ },
|
|
105
|
+}
|
|
106
|
+</script>
|
|
107
|
+
|