| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <template>
- <el-card shadow="never" class="aui-card--fill">
- <div class="mod-home">
- <div class="top adfac">
- <div class="back adfac" @click="handleBack">
- <img src="@/assets/img/back.png">
- <span>返回</span>
- </div>
- <div class="line"></div>
- <div class="text">报名信息</div>
- </div>
- <div class="title">活动信息</div>
- <div class="info">
- <div class="info-pre adf">
- <div class="info-pre-title adf"><span>*</span>活动名称:</div>
- <div class="info-pre-content">{{ activityInfo.activityName || '--' }}</div>
- </div>
- <div class="info-pre adf">
- <div class="info-pre-title adf"><span>*</span>活动时间:</div>
- <div class="info-pre-content">{{ activityInfo.activityStartTime || '--' }} - {{ activityInfo.activityEndTime || '--' }}</div>
- </div>
- <div class="info-pre adf">
- <div class="info-pre-title adf"><span>*</span>渠道方:</div>
- <div class="info-pre-content">{{ activityInfo.channelName || '--' }}</div>
- </div>
- <div class="info-pre adf">
- <div class="info-pre-title adf"><span>*</span>活动地址:</div>
- <div class="info-pre-content">{{ provinceName || '' }}{{ cityName || '' }}{{ districtName || '' }}{{ activityInfo.address || '--' }}</div>
- </div>
- <div class="info-pre adf">
- <div class="info-pre-title adf"><span>*</span>会员等级:</div>
- <div class="info-pre-content">{{ activityInfo.userLevel?`Lv.${activityInfo.userLevel} 级以上`:'无限制' }}</div>
- </div>
- <div class="info-pre adf">
- <div class="info-pre-title adf"><span>*</span>举办方:</div>
- <div class="info-pre-content">{{ activityInfo.organizerName || '--' }}</div>
- </div>
- <div class="info-pre adf">
- <div class="info-pre-title adf"><span>*</span>报名人数:</div>
- <div class="info-pre-content">{{ activityInfo.signedNumber || 0 }}/{{ activityInfo.recruitmentMax || '无限制' }}</div>
- </div>
- <div class="info-pre adf">
- <div class="info-pre-title adf"><span>*</span>公益支持:</div>
- <div class="info-pre-content" v-if="activityInfo.activityLimit!=3">{{ (activityInfo.valueLimit||'-') }} {{ activityLimitCfg[activityInfo.activityLimit]||'-' }}</div>
- <div class="info-pre-content" v-else>免费</div>
- </div>
- <div class="info-pre adf">
- <div class="info-pre-title adf"><span>*</span>公益支持内容:</div>
- <div class="info-pre-content">{{ activityInfo.loveValueContent || '--' }}</div>
- </div>
- </div>
- <div class="title adfacjb">
- 活动报名信息
- <el-button type="primary" @click="handleExcel">导出Excel</el-button>
- </div>
- <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无活动报名信息" style="margin-top: 16px;">
- <el-table-column prop="id" label="善行少年编号" width="200"></el-table-column>
- <el-table-column prop="welfareName" label="家庭名称" width="150"></el-table-column>
- <el-table-column prop="contactPhone" label="手机号码" width="150"></el-table-column>
- <el-table-column prop="xxx" label="渠道方" width="200"></el-table-column>
- <el-table-column prop="name" label="姓名" width="150"></el-table-column>
- <el-table-column prop="idCard" label="身份证号" width="300"></el-table-column>
- <el-table-column prop="volunteerNo" label="义工号" width="100"></el-table-column>
- <el-table-column prop="gender" label="性别" width="100"></el-table-column>
- <el-table-column prop="xxx" label="年龄" width="100"></el-table-column>
- <el-table-column prop="xxx" label="参会情况" width="120"></el-table-column>
- <el-table-column prop="currentSchool" label="就读学校" width="200"></el-table-column>
- <el-table-column prop="createDate" label="报名时间" width="240"></el-table-column>
- <el-table-column prop="signupState" label="状态" width="150" fixed="right">
- <template slot-scope="scope">{{ statusCfg[scope.row.signupState] || '--' }}</template>
- </el-table-column>
- </el-table>
- <el-pagination
- :current-page="queryParams.page"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="queryParams.limit"
- :total="total"
- layout="total, sizes, prev, pager, next, jumper"
- @size-change="pageSizeChangeHandle"
- @current-change="pageCurrentChangeHandle">
- </el-pagination>
- </div>
- </el-card>
- </template>
- <script>
- import Cookies from 'js-cookie'
- import qs from 'qs'
- export default {
- data () {
- return {
- provinceName: '',
- cityName: '',
- districtName: '',
- activityInfo: null,
- activityLimitCfg: {
- 1: '爱心值',
- 2: '专享券',
- 3: '免费'
- },
- loading: false,
- queryParams: {
- activityId: this.$route.query.id,
- page: 1,
- limit: 10
- },
- statusCfg: {
- '-1': '已取消',
- 1: '已报名',
- 2: '已签到',
- 3: '已填档案'
- }
- }
- },
- mounted () {
- this.getDetail(this.$route.query.id)
- this.getList()
- },
- methods: {
- handleBack () {
- this.$router.push({ name: 'activity-list' })
- },
- getSSQ (code, key) {
- this.$http.get('/sys/region/' + code).then(({ data: res }) => {
- if (res.code !== 0) return this.$message.error(res.msg)
- this[key] = res.data.name
- })
- },
- getDetail (id) {
- this.$http.get('/core/activity/' + id).then(({ data: res }) => {
- if (res.code !== 0) return this.$message.error(res.msg)
- this.activityInfo = res.data
- this.getSSQ(res.data.provinceId, 'provinceName')
- this.getSSQ(res.data.cityId, 'cityName')
- this.getSSQ(res.data.districtId, 'districtName')
- })
- },
- getList () {
- this.loading = true
- this.$http.get('/core/activity/signup/getSignupList', { params: this.queryParams }).then(({ data: res }) => {
- if (res.code !== 0) return this.$message.error(res.msg)
- this.dataList = res.data.list
- this.total = res.data.total
- this.loading = false
- })
- },
- pageSizeChangeHandle (val) {
- this.queryParams.limit = val
- this.getList()
- },
- pageCurrentChangeHandle (val) {
- this.queryParams.page = val
- this.getList()
- },
- handleExcel () {
- let newDataForm = Object.assign({}, this.queryParams)
- var params = qs.stringify({
- 'token': Cookies.get('token'),
- ...newDataForm
- })
- window.location.href = `${window.SITE_CONFIG['apiURL']}/core/activity/signup/export?${params}`
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .top {
- padding-bottom: 13px;
- box-shadow: inset 0px -1px 0px 0px #F0F1F7;
- .back {
- cursor: pointer;
- img {
- width: 22px;
- height: 22px;
- }
- span {
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 14px;
- color: #00AE57;
- line-height: 20px;
- margin-left: 6px;
- }
- }
- .line {
- width: 1px;
- height: 16px;
- background: #F0F1F7;
- margin-left: 14px;
- }
- .text {
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #657588;
- line-height: 20px;
- margin-left: 10px;
- }
- }
- .title{
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 16px;
- color: #393939;
- line-height: 22px;
- margin-top: 20px;
- }
- .info{
- background: #F5F8FC;
- border-radius: 8px;
- margin-top: 10px;
- padding: 0 16px 20px;
- display: flex;
- flex-wrap: wrap;
- &-pre{
- width: calc(100% / 3);
- margin-top: 20px;
- &-title{
- width: 130px;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #646464;
- line-height: 20px;
- text-align: right;
- letter-spacing: 1px;
- justify-content: flex-end;
- padding-right: 4px;
- box-sizing: border-box;
- span{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #FB5454;
- line-height: 20px;
- margin-right: 6px;
- }
- }
- &-content{
- width: calc(100% - 130px);
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 14px;
- color: #252525;
- line-height: 20px;
- }
- }
- }
- </style>
|