飞天云平台-国产化
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

319 lines
6.0 KiB

2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
  1. <template>
  2. <el-dialog
  3. title="活动详情"
  4. :visible="dialogVisible"
  5. width="375px"
  6. class="activity-detail-dialog"
  7. top="20px"
  8. append-to-body
  9. :close-on-click-modal="false"
  10. @close="handleClose"
  11. >
  12. <div class="mini-program-container">
  13. <div class="content">
  14. <img v-if="activity.coverImage" class="activity-img" :src="`${imgHttpsUrl}/files/${activity.coverImage}`">
  15. <div v-else class="activity-img-placeholder" />
  16. <div class="activity-base">
  17. <span class="title">{{ activity.title }}</span>
  18. <div class="time">
  19. <i class="el-icon-time" />
  20. <span>{{ activity.startTime }} - {{ activity.endTime }}</span>
  21. </div>
  22. <div class="location">
  23. <i class="iconfont icon-weizhi-copy" />
  24. <span>{{ activity.activityLocation }}</span>
  25. </div>
  26. </div>
  27. <div class="rich-content">
  28. <span class="content-title">活动介绍/回顾</span>
  29. <div class="content-html" v-html="activity.activityContent" />
  30. </div>
  31. </div>
  32. </div>
  33. </el-dialog>
  34. </template>
  35. <script>
  36. import { mapGetters } from 'vuex'
  37. export default {
  38. name: 'ActivityDetail',
  39. props: {
  40. visible: {
  41. type: Boolean,
  42. default: false
  43. },
  44. activity: {
  45. type: Object,
  46. default: () => ({})
  47. }
  48. },
  49. data() {
  50. return {
  51. dialogVisible: false
  52. }
  53. },
  54. computed: {
  55. ...mapGetters(['baseApi']),
  56. imgHttpsUrl() {
  57. if (process.env.NODE_ENV === 'production') {
  58. return (window.g && window.g.ApiUrl) || ''
  59. } else {
  60. return process.env.VUE_APP_WECHAT_URL
  61. }
  62. }
  63. },
  64. watch: {
  65. visible(val) {
  66. this.dialogVisible = val
  67. }
  68. },
  69. methods: {
  70. handleClose() {
  71. this.dialogVisible = false
  72. this.$emit('update:activity', {})
  73. this.$emit('update:visible', false)
  74. }
  75. }
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. @import "~@/assets/styles/quillEditor.css";
  80. .activity-detail-dialog {
  81. ::v-deep .el-dialog{
  82. padding: 0 !important;
  83. .el-dialog__header {
  84. padding: 17px !important;
  85. }
  86. .el-dialog__body {
  87. padding: 0;
  88. overflow: hidden;
  89. }
  90. .el-dialog__footer {
  91. display: none;
  92. }
  93. }
  94. }
  95. .mini-program-container {
  96. width: 100%;
  97. height: 667px;
  98. background-color: #f5f5f5;
  99. display: flex;
  100. flex-direction: column;
  101. overflow: hidden;
  102. ::-webkit-scrollbar {
  103. width: 4px;
  104. height: 4px;
  105. }
  106. ::-webkit-scrollbar-thumb {
  107. background-color: #afb6c4;
  108. }
  109. }
  110. // .header {
  111. // height: 44px;
  112. // background-color: #ffffff;
  113. // display: flex;
  114. // align-items: center;
  115. // justify-content: space-between;
  116. // padding: 0 16px;
  117. // box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  118. // }
  119. // .header-left {
  120. // width: 44px;
  121. // height: 44px;
  122. // display: flex;
  123. // align-items: center;
  124. // justify-content: center;
  125. // cursor: pointer;
  126. // font-size: 20px;
  127. // color: #333;
  128. // }
  129. // .header-title {
  130. // font-size: 17px;
  131. // font-weight: 600;
  132. // color: #333;
  133. // }
  134. // .header-right {
  135. // width: 60px;
  136. // display: flex;
  137. // align-items: center;
  138. // justify-content: space-between;
  139. // font-size: 20px;
  140. // color: #333;
  141. // }
  142. .content {
  143. flex: 1;
  144. overflow-y: auto;
  145. }
  146. .activity-img {
  147. display: block;
  148. width: 100%;
  149. // height: 180px;
  150. object-fit: cover;
  151. }
  152. .activity-img-placeholder {
  153. width: 100%;
  154. height: 180px;
  155. background-color: #eee;
  156. }
  157. .activity-base {
  158. background: #fff;
  159. padding: 15px;
  160. margin-bottom: 10px;
  161. .title {
  162. font-size: 16px;
  163. font-weight: bold;
  164. padding-bottom: 10px;
  165. color: #333;
  166. }
  167. .time,
  168. .location {
  169. display: flex;
  170. align-items: center;
  171. font-size: 12px;
  172. color: #999;
  173. padding-top: 10px;
  174. i {
  175. padding-right: 4px;
  176. font-size: 14px;
  177. }
  178. }
  179. .location {
  180. i {
  181. padding-right: 2px;
  182. }
  183. }
  184. }
  185. .rich-content {
  186. background: #fff;
  187. .content-title {
  188. position: relative;
  189. font-size: 16px;
  190. font-weight: bold;
  191. color: #333;
  192. padding: 12px 0 10px 12px;
  193. display: block;
  194. &::before {
  195. position: absolute;
  196. left: 0;
  197. top: 50%;
  198. margin-top: -9px;
  199. content: "";
  200. width: 4px;
  201. height: 18px;
  202. background-color: #01a4fe;
  203. }
  204. }
  205. }
  206. .content-html {
  207. padding: 10px;
  208. ::v-deep img {
  209. width: 100%;
  210. display: block;
  211. }
  212. ::v-deep p{
  213. line-height: 1.5;
  214. margin: 15px 0;
  215. }
  216. ::v-deep blockquote {
  217. background-color: var(--w-e-textarea-slight-bg-color);
  218. border-left: 8px solid var(--w-e-textarea-selected-border-color);
  219. display: block;
  220. font-size: 100%;
  221. line-height: 1.5;
  222. margin: 10px 0;
  223. padding: 10px;
  224. }
  225. ::v-deep .table-container {
  226. border: 1px dashed #dcdfe6;
  227. border-radius: 5px;
  228. margin-top: 10px;
  229. overflow-x: auto;
  230. padding: 10px;
  231. width: 100%;
  232. }
  233. ::v-deep table {
  234. width: 100% !important;
  235. border-collapse: collapse;
  236. margin: 10px 0;
  237. }
  238. ::v-deep table tr:nth-child(even) {
  239. background-color: #fafafa;
  240. }
  241. ::v-deep table td, ::v-deep table th {
  242. border: 1px solid #dcdfe6;
  243. padding: 8px 12px;
  244. text-align: center;
  245. font-size: 14px;
  246. }
  247. }
  248. // .detail-bottom {
  249. // position: absolute;
  250. // bottom: 0;
  251. // left: 0;
  252. // right: 0;
  253. // height: 50px;
  254. // background: #fff;
  255. // display: flex;
  256. // align-items: center;
  257. // justify-content: space-between;
  258. // padding: 0 15px;
  259. // box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
  260. // }
  261. // .detail-left {
  262. // display: flex;
  263. // gap: 10px;
  264. // }
  265. // .handle-btn {
  266. // display: flex;
  267. // align-items: center;
  268. // gap: 4px;
  269. // background: #f5f5f5;
  270. // border-radius: 30px;
  271. // padding: 0 12px;
  272. // height: 36px;
  273. // font-size: 14px;
  274. // color: #666;
  275. // border: none;
  276. // cursor: pointer;
  277. // i {
  278. // font-size: 16px;
  279. // }
  280. // }
  281. // .join-btn {
  282. // background: #01a4fe;
  283. // color: #fff;
  284. // border-radius: 30px;
  285. // padding: 0 20px;
  286. // height: 36px;
  287. // font-size: 14px;
  288. // border: none;
  289. // cursor: pointer;
  290. // }
  291. // .disabled-btn {
  292. // background: #ccc !important;
  293. // cursor: not-allowed;
  294. // }
  295. </style>