hejianhao
2025-04-16 dab2d210ca06c1faa514c6388fbd5de1ab355360
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<template>
    <div class="cor-clap-see">
    <div class="nav">
      <span>随手拍活动详情</span>
      <el-button type="primary" size="medium" @click="$router.go(-1)">返回</el-button>
    </div>
      <div class="time-box">
        活动时间:{{item.activityStartAt}} ~{{item.activityEndAt}}<span>{{['','待开始','进行中','已结束','已取消'][item.status]}}</span>
      </div>
      <!---->
      <div class="title">居民参与记录</div>
      <div>
        <v-tool-table
          :trs="trs"
          :tds="tds"
        >
          <template v-slot:activityType="{scope}">
            {{['','优秀','良好','普通'][scope.activityType]}}
          </template>
          <template v-slot:btn="{scope}">
            <el-button @click="see(scope)" type="text">查看</el-button>
          </template>
        </v-tool-table>
      </div>
      <v-tool-page
        :item="paged"
        @on-page="onPage"
      ></v-tool-page>
    </div>
</template>
<script>
    export default {
        props: [],
        components: {},
        data() {
            return {
              trs: [
                { text: "姓名", val: "userName" },
                { text: "账号", val: "nickName"},
                { text: "随手拍内容", val: "detail" },
                { text: "内容质量", val: "btn",slot:'activityType' },
                { text: "获得奖励", val: "activityAmount"},
                { text: "参与时间", val: "createAt"},
                { text: "操作", val: "btn" },
              ],
              tds:[],
              os:{
 
              },
              paged: { page: 0, total: 10, r: 0, limit: 10 },
              item:{}
            }
        },
        created() {
          if(this.$route.query.item){
            this.item = JSON.parse(this.$route.query.item)
            // console.log(this.item)
            this.init()
          }
 
        },
        mounted() {
 
        },
        methods: {
          back(){
            this.$router.back()
          },
          init(){
            Object.assign(this.os, {
              pageNum: this.paged.page,
              pageSize: this.paged.limit,
              activityId:this.item.id
            });
            this.$api.post('easy/photo/page/user',this.os,e=>{
              console.log(e)
              this.paged.total = e.total
              this.tds = e.records
            })
          },
          see(item){
            this.$router.push(this.$nav.url("/act_clap_detail/" + item.id));
          },
          onPage(v) {
            //分页
            if (v.page === this.paged.page && v.page && !v.reset) {
              return 0;
            }
            this.paged.page = v.page;
            this.paged.limit = v.limit;
            this.init();
          },
        },
        watch: {},
        computed: {}
    }
 
</script>
<style scoped lang="less">
  .cor-clap-see{
    overflow: scroll;
    .time-box{
      display: flex;
      span{
         color: #2d9df2;
        padding-left: 20px;
      }
    }
    .title{
      padding: 40px 0 10px;
    }
  }
.nav {
  padding: 20px 0;
  span {
    font-size: 18px;
    height: 40px;
    line-height: 40px;
    font-weight: 700;
    margin-right: 30px;
  }
}
</style>