info.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <el-card shadow="never" class="aui-card--fill">
  3. <div class="mod-home">
  4. <div class="top adfac">
  5. <div class="back adfac" @click="handleBack">
  6. <img src="@/assets/img/back.png">
  7. <span>返回</span>
  8. </div>
  9. <div class="line"></div>
  10. <div class="text">报名信息</div>
  11. </div>
  12. <div class="title">活动信息</div>
  13. <div class="info">
  14. <div class="info-pre adf">
  15. <div class="info-pre-title adf"><span>*</span>活动名称:</div>
  16. <div class="info-pre-content">{{ activityInfo.activityName || '--' }}</div>
  17. </div>
  18. <div class="info-pre adf">
  19. <div class="info-pre-title adf"><span>*</span>活动时间:</div>
  20. <div class="info-pre-content">{{ activityInfo.activityStartTime || '--' }} - {{ activityInfo.activityEndTime || '--' }}</div>
  21. </div>
  22. <div class="info-pre adf">
  23. <div class="info-pre-title adf"><span>*</span>渠道方:</div>
  24. <div class="info-pre-content">{{ activityInfo.channelName || '--' }}</div>
  25. </div>
  26. <div class="info-pre adf">
  27. <div class="info-pre-title adf"><span>*</span>活动地址:</div>
  28. <div class="info-pre-content">{{ provinceName || '' }}{{ cityName || '' }}{{ districtName || '' }}{{ activityInfo.address || '--' }}</div>
  29. </div>
  30. <div class="info-pre adf">
  31. <div class="info-pre-title adf"><span>*</span>会员等级:</div>
  32. <div class="info-pre-content">{{ activityInfo.userLevel?`Lv.${activityInfo.userLevel} 级以上`:'无限制' }}</div>
  33. </div>
  34. <div class="info-pre adf">
  35. <div class="info-pre-title adf"><span>*</span>举办方:</div>
  36. <div class="info-pre-content">{{ activityInfo.organizerName || '--' }}</div>
  37. </div>
  38. <div class="info-pre adf">
  39. <div class="info-pre-title adf"><span>*</span>报名人数:</div>
  40. <div class="info-pre-content">{{ activityInfo.signedNumber || 0 }}/{{ activityInfo.recruitmentMax || '无限制' }}</div>
  41. </div>
  42. <div class="info-pre adf">
  43. <div class="info-pre-title adf"><span>*</span>公益支持:</div>
  44. <div class="info-pre-content" v-if="activityInfo.activityLimit!=3">{{ (activityInfo.valueLimit||'-') }} {{ activityLimitCfg[activityInfo.activityLimit]||'-' }}</div>
  45. <div class="info-pre-content" v-else>免费</div>
  46. </div>
  47. <div class="info-pre adf">
  48. <div class="info-pre-title adf"><span>*</span>公益支持内容:</div>
  49. <div class="info-pre-content">{{ activityInfo.loveValueContent || '--' }}</div>
  50. </div>
  51. </div>
  52. <div class="title adfacjb">
  53. 活动报名信息
  54. <el-button type="primary" @click="handleExcel">导出Excel</el-button>
  55. </div>
  56. <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无活动报名信息" style="margin-top: 16px;">
  57. <el-table-column prop="id" label="善行少年编号" width="200"></el-table-column>
  58. <el-table-column prop="welfareName" label="家庭名称" width="150"></el-table-column>
  59. <el-table-column prop="contactPhone" label="手机号码" width="150"></el-table-column>
  60. <el-table-column prop="xxx" label="渠道方" width="200"></el-table-column>
  61. <el-table-column prop="name" label="姓名" width="150"></el-table-column>
  62. <el-table-column prop="idCard" label="身份证号" width="300"></el-table-column>
  63. <el-table-column prop="volunteerNo" label="义工号" width="100"></el-table-column>
  64. <el-table-column prop="gender" label="性别" width="100"></el-table-column>
  65. <el-table-column prop="xxx" label="年龄" width="100"></el-table-column>
  66. <el-table-column prop="xxx" label="参会情况" width="120"></el-table-column>
  67. <el-table-column prop="currentSchool" label="就读学校" width="200"></el-table-column>
  68. <el-table-column prop="createDate" label="报名时间" width="240"></el-table-column>
  69. <el-table-column prop="signupState" label="状态" width="150" fixed="right">
  70. <template slot-scope="scope">{{ statusCfg[scope.row.signupState] || '--' }}</template>
  71. </el-table-column>
  72. </el-table>
  73. <el-pagination
  74. :current-page="queryParams.page"
  75. :page-sizes="[10, 20, 50, 100]"
  76. :page-size="queryParams.limit"
  77. :total="total"
  78. layout="total, sizes, prev, pager, next, jumper"
  79. @size-change="pageSizeChangeHandle"
  80. @current-change="pageCurrentChangeHandle">
  81. </el-pagination>
  82. </div>
  83. </el-card>
  84. </template>
  85. <script>
  86. import Cookies from 'js-cookie'
  87. import qs from 'qs'
  88. export default {
  89. data () {
  90. return {
  91. provinceName: '',
  92. cityName: '',
  93. districtName: '',
  94. activityInfo: null,
  95. activityLimitCfg: {
  96. 1: '爱心值',
  97. 2: '专享券',
  98. 3: '免费'
  99. },
  100. loading: false,
  101. queryParams: {
  102. activityId: this.$route.query.id,
  103. page: 1,
  104. limit: 10
  105. },
  106. statusCfg: {
  107. '-1': '已取消',
  108. 1: '已报名',
  109. 2: '已签到',
  110. 3: '已填档案'
  111. }
  112. }
  113. },
  114. mounted () {
  115. this.getDetail(this.$route.query.id)
  116. this.getList()
  117. },
  118. methods: {
  119. handleBack () {
  120. this.$router.push({ name: 'activity-list' })
  121. },
  122. getSSQ (code, key) {
  123. this.$http.get('/sys/region/' + code).then(({ data: res }) => {
  124. if (res.code !== 0) return this.$message.error(res.msg)
  125. this[key] = res.data.name
  126. })
  127. },
  128. getDetail (id) {
  129. this.$http.get('/core/activity/' + id).then(({ data: res }) => {
  130. if (res.code !== 0) return this.$message.error(res.msg)
  131. this.activityInfo = res.data
  132. this.getSSQ(res.data.provinceId, 'provinceName')
  133. this.getSSQ(res.data.cityId, 'cityName')
  134. this.getSSQ(res.data.districtId, 'districtName')
  135. })
  136. },
  137. getList () {
  138. this.loading = true
  139. this.$http.get('/core/activity/signup/getSignupList', { params: this.queryParams }).then(({ data: res }) => {
  140. if (res.code !== 0) return this.$message.error(res.msg)
  141. this.dataList = res.data.list
  142. this.total = res.data.total
  143. this.loading = false
  144. })
  145. },
  146. pageSizeChangeHandle (val) {
  147. this.queryParams.limit = val
  148. this.getList()
  149. },
  150. pageCurrentChangeHandle (val) {
  151. this.queryParams.page = val
  152. this.getList()
  153. },
  154. handleExcel () {
  155. let newDataForm = Object.assign({}, this.queryParams)
  156. var params = qs.stringify({
  157. 'token': Cookies.get('token'),
  158. ...newDataForm
  159. })
  160. window.location.href = `${window.SITE_CONFIG['apiURL']}/core/activity/signup/export?${params}`
  161. }
  162. }
  163. }
  164. </script>
  165. <style scoped lang="scss">
  166. .top {
  167. padding-bottom: 13px;
  168. box-shadow: inset 0px -1px 0px 0px #F0F1F7;
  169. .back {
  170. cursor: pointer;
  171. img {
  172. width: 22px;
  173. height: 22px;
  174. }
  175. span {
  176. font-family: PingFang-SC, PingFang-SC;
  177. font-weight: bold;
  178. font-size: 14px;
  179. color: #00AE57;
  180. line-height: 20px;
  181. margin-left: 6px;
  182. }
  183. }
  184. .line {
  185. width: 1px;
  186. height: 16px;
  187. background: #F0F1F7;
  188. margin-left: 14px;
  189. }
  190. .text {
  191. font-family: PingFangSC, PingFang SC;
  192. font-weight: 400;
  193. font-size: 14px;
  194. color: #657588;
  195. line-height: 20px;
  196. margin-left: 10px;
  197. }
  198. }
  199. .title{
  200. font-family: PingFang-SC, PingFang-SC;
  201. font-weight: bold;
  202. font-size: 16px;
  203. color: #393939;
  204. line-height: 22px;
  205. margin-top: 20px;
  206. }
  207. .info{
  208. background: #F5F8FC;
  209. border-radius: 8px;
  210. margin-top: 10px;
  211. padding: 0 16px 20px;
  212. display: flex;
  213. flex-wrap: wrap;
  214. &-pre{
  215. width: calc(100% / 3);
  216. margin-top: 20px;
  217. &-title{
  218. width: 130px;
  219. font-family: PingFangSC, PingFang SC;
  220. font-weight: 400;
  221. font-size: 14px;
  222. color: #646464;
  223. line-height: 20px;
  224. text-align: right;
  225. letter-spacing: 1px;
  226. justify-content: flex-end;
  227. padding-right: 4px;
  228. box-sizing: border-box;
  229. span{
  230. font-family: PingFangSC, PingFang SC;
  231. font-weight: 400;
  232. font-size: 14px;
  233. color: #FB5454;
  234. line-height: 20px;
  235. margin-right: 6px;
  236. }
  237. }
  238. &-content{
  239. width: calc(100% - 130px);
  240. font-family: PingFang-SC, PingFang-SC;
  241. font-weight: bold;
  242. font-size: 14px;
  243. color: #252525;
  244. line-height: 20px;
  245. }
  246. }
  247. }
  248. </style>