DetailModal.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <el-dialog :close-on-click-modal="false" title="提示" :visible.sync="activityVisible" width="50%">
  3. <div v-loading="isLoading">
  4. <el-descriptions title="活动信息" :column="2" border>
  5. <el-descriptions-item>
  6. <template slot="label">所属俱乐部ID</template>
  7. {{ activityInfo.clubId || '--' }}
  8. </el-descriptions-item>
  9. <el-descriptions-item>
  10. <template slot="label">活动类型</template>
  11. <el-tag type="primary" size="mini" v-if="activityInfo.type == 1">公益活动</el-tag>
  12. <el-tag type="warning" size="mini" v-if="activityInfo.type == 2">会议</el-tag>
  13. <el-tag type="success" size="mini" v-if="activityInfo.type == 3">爱心传递</el-tag>
  14. <el-tag type="info" size="mini" v-if="activityInfo.type == 4">公告</el-tag>
  15. <el-tag type="danger" size="mini" v-if="activityInfo.type == 5">商机</el-tag>
  16. </el-descriptions-item>
  17. <el-descriptions-item>
  18. <template slot="label">活动标题</template>
  19. {{ activityInfo.title || '--' }}
  20. </el-descriptions-item>
  21. <el-descriptions-item>
  22. <template slot="label">活动封面</template>
  23. <el-image style="height: 50px" :src="activityInfo.cover" :preview-src-list="[activityInfo.cover]" fit="cover" />
  24. </el-descriptions-item>
  25. <el-descriptions-item>
  26. <template slot="label">活动内容</template>
  27. {{ activityInfo.content || '--' }}
  28. </el-descriptions-item>
  29. <el-descriptions-item>
  30. <template slot="label">状态</template>
  31. <el-tag type="primary" size="mini" v-if="activityInfo.state == 2">已开始</el-tag>
  32. <el-tag type="success" size="mini" v-if="activityInfo.state == 3">已结束</el-tag>
  33. <el-tag type="info" size="mini" v-if="activityInfo.state == 4">已撤销</el-tag>
  34. <el-tag type="danger" size="mini" v-if="activityInfo.state == 1">草稿</el-tag>
  35. </el-descriptions-item>
  36. <el-descriptions-item>
  37. <template slot="label">报名范围</template>
  38. <el-tag type="primary" size="mini" v-if="activityInfo.state == 1">所有用户</el-tag>
  39. <el-tag type="success" size="mini" v-if="activityInfo.state == 2">仅限俱乐部会员</el-tag>
  40. </el-descriptions-item>
  41. <el-descriptions-item>
  42. <template slot="label">封面</template>
  43. <el-image style="width: 40px; height: 40px; border-radius: 50%" v-if="activityInfo.cover" :src="activityInfo.cover" :preview-src-list="[activityInfo.cover]" fit="cover" />
  44. <span v-else>--</span>
  45. </el-descriptions-item>
  46. <el-descriptions-item>
  47. <template slot="label">宣传视频</template>
  48. <!-- <video style="width: 100px; height: 50px" :src="activityInfo.promotionalVideo"></video> -->
  49. <el-button @click="$refs.previewVideoRef && $refs.previewVideoRef.show(activityInfo.promotionalVideo)" v-if="activityInfo.promotionalVideo" type="text">查看视频</el-button>
  50. <span v-else>--</span>
  51. </el-descriptions-item>
  52. <el-descriptions-item>
  53. <template slot="label">开始时间</template>
  54. {{ activityInfo.startTime || '--' }}
  55. </el-descriptions-item>
  56. <el-descriptions-item>
  57. <template slot="label">结束时间</template>
  58. {{ activityInfo.endTime || '--' }}
  59. </el-descriptions-item>
  60. <el-descriptions-item :span="1">
  61. <template slot="label">活动地址</template>
  62. {{ activityInfo.activitiesAddress || '--' }}
  63. </el-descriptions-item>
  64. <el-descriptions-item :span="1">
  65. <template slot="label">参与方式</template>
  66. {{ activityInfo.participationMethod || '--' }}
  67. </el-descriptions-item>
  68. <el-descriptions-item :span="1">
  69. <template slot="label">注意事项</template>
  70. {{ activityInfo.precautions || '--' }}
  71. </el-descriptions-item>
  72. </el-descriptions>
  73. <!-- 发布信息 -->
  74. <el-descriptions class="margin-top" title="发布信息" :column="2" border>
  75. <el-descriptions-item>
  76. <template slot="label">发布人会员ID</template>
  77. {{ activityInfo.publishMemberId || '--' }}
  78. </el-descriptions-item>
  79. <el-descriptions-item>
  80. <template slot="label">发布人昵称</template>
  81. {{ activityInfo.publishMemberName || '--' }}
  82. </el-descriptions-item>
  83. <el-descriptions-item>
  84. <template slot="label">发布人头像</template>
  85. <el-image style="height: 50px" :src="activityInfo.publishMemberAvatar" :preview-src-list="[activityInfo.publishMemberAvatar]" fit="cover" />
  86. </el-descriptions-item>
  87. </el-descriptions>
  88. <!-- 商机信息 -->
  89. <el-descriptions class="margin-top" title="商机信息" :column="2" border v-if="activityInfo.type == 5">
  90. <el-descriptions-item>
  91. <template slot="label">商机类型</template>
  92. <el-tag type="primary" size="mini" v-if="activityInfo.opportunityType == 1">寻求合作</el-tag>
  93. <el-tag type="warning" size="mini" v-if="activityInfo.opportunityType == 2">寻求采购</el-tag>
  94. </el-descriptions-item>
  95. <el-descriptions-item>
  96. <template slot="label">商机联系方式</template>
  97. {{ activityInfo.opportunityContactNumber || '--' }}
  98. </el-descriptions-item>
  99. <el-descriptions-item>
  100. <template slot="label">商机联系邮箱</template>
  101. {{ activityInfo.opportunityContactEmail || '--' }}
  102. </el-descriptions-item>
  103. <el-descriptions-item>
  104. <template slot="label">商机方法链接</template>
  105. <a v-if="activityInfo.opportunityAuthorityUrl" :href="activityInfo.opportunityAuthorityUrl" target="_blank"></a>
  106. <span v-on:select="">--</span>
  107. </el-descriptions-item>
  108. </el-descriptions>
  109. <!-- 参与会员 -->
  110. <el-descriptions class="margin-top" title="参与会员列表" :column="2" border>
  111. <el-descriptions-item>
  112. <el-table :data="tableData" :style="{ width: '100%' }">
  113. <el-table-column prop="memberId" label="会员ID" width="180" />
  114. <el-table-column prop="memberName" label="会员昵称" width="180" />
  115. <el-table-column prop="memberAvatar" label="会员头像" align="center" width="120">
  116. <template slot-scope="scope">
  117. <el-image :src="scope.row.memberAvatar" style="width: 40px; height: 40px; border-radius: 50%" :preview-src-list="[scope.row.memberAvatar]" fit="cover" />
  118. </template>
  119. </el-table-column>
  120. <el-table-column prop="memberMobile" label="会员手机号" />
  121. <el-table-column prop="state" label="报名状态" align="center" width="120">
  122. <template slot-scope="scope">
  123. <el-tag type="primary" size="mini" v-if="activityInfo.state == 1">已报名</el-tag>
  124. <el-tag type="success" size="mini" v-if="activityInfo.state == 2">已确认</el-tag>
  125. </template>
  126. </el-table-column>
  127. </el-table>
  128. </el-descriptions-item>
  129. </el-descriptions>
  130. </div>
  131. <template #footer>
  132. <span class="dialog-footer">
  133. <el-button size="mini" @click="close">取消</el-button>
  134. </span>
  135. </template>
  136. <PreviewVideo ref="previewVideoRef"></PreviewVideo>
  137. </el-dialog>
  138. </template>
  139. <script>
  140. import { getActivityDetailApi } from '@/api/rm-bank/index'
  141. import PreviewVideo from './PreviewVideo.vue'
  142. export default {
  143. components: {PreviewVideo},
  144. data() {
  145. return {
  146. isLoading: false,
  147. activityVisible: false,
  148. activityInfo: {},
  149. members: []
  150. }
  151. },
  152. methods: {
  153. async show(activityId) {
  154. if (!activityId) {
  155. return this.$message.error('活动id不能为空')
  156. }
  157. this.activityVisible = true
  158. try {
  159. this.isLoading = true
  160. const res = await getActivityDetailApi({ id: activityId })
  161. this.activityInfo = res.data.activities
  162. this.members = res.data.activitiesMembers
  163. } finally {
  164. this.isLoading = false
  165. }
  166. },
  167. close() {
  168. this.activityVisible = false
  169. },
  170. reset() {
  171. this.activityInfo = {}
  172. this.members = []
  173. }
  174. }
  175. }
  176. </script>
  177. <style lang="scss" scoped>
  178. ::v-deep .el-descriptions-item__cell {
  179. width: 50px;
  180. }
  181. .margin-top {
  182. margin-top: 20px;
  183. }
  184. </style>