themeActivity.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. <template>
  2. <view class="container theme-container">
  3. <!-- 筛选部分 -->
  4. <view class="select-content-activity">
  5. <view class="top-title" v-if="!type">
  6. <view :class="['content-title', !contentDetail.IsJump && 'jump-title']" @click="jumpHandler">
  7. <text class="jump-label">{{ contentDetail.Label }}</text>
  8. <text v-if="contentDetail.IsJump" class="jump-text"> 查看资源包>></text>
  9. <image v-if="contentDetail.IndustryNewLabel" class="new_icon" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png" mode=""></image>
  10. </view>
  11. </view>
  12. <view :class="['screen-item', (isEndActivity || !type) && 'end-select-item']">
  13. <block v-if="!isEndActivity && type">
  14. <text :class="[isShowJurisdiction ? 'active' : '', 'text-item']" @click="permissioActivity">有权限行业</text>
  15. <!-- 各种状态选择 -->
  16. <view class="select-conyent" ref="select-conyent">
  17. <van-dropdown-menu active-color="#333333">
  18. <van-dropdown-item id="industry" :title="chartPermissionName">
  19. <view class="menu-items">
  20. <view class="menu-items-box" v-for="item in listChartPermission" :key="item.ChartPermissionId" @click="overallClick(item)">
  21. <view class="items-box">
  22. <u-icon v-if="item.IsChoose" name="checkbox-mark" :color="isShowJurisdiction ? '#ccc' : '#2C83FF'" size="24"></u-icon>
  23. </view>
  24. <text>{{ item.PermissionName }}</text>
  25. </view>
  26. </view>
  27. <view class="replacement">
  28. <text @click="replacementBtn" class="replacement-box">重置</text>
  29. <text @click="replacementConfirm">确定</text>
  30. </view>
  31. </van-dropdown-item>
  32. </van-dropdown-menu>
  33. </view>
  34. </block>
  35. <block v-if="isEndActivity">
  36. <text @click="selectMultipleHandler(item, '类型')" v-for="item in activityTypeList" :key="item.Id" :class="['select-item-multiple', item.IsChoose && 'active']">{{ item.StatusName }}</text>
  37. </block>
  38. <block v-else>
  39. <text @click="selectMultipleHandler(item, '日期')" v-for="item in activityTimeList" :key="item.Id" :class="['select-item-multiple', item.IsChoose && 'active']">{{ item.StatusName }}</text>
  40. </block>
  41. </view>
  42. <view class="screen-item screen-item-ul" v-if="isEndActivity">
  43. <text @click="monthWeekHandler(item)" v-for="item in activityMonthWeekList" :key="item.Id" :class="['text-item', item.IsChoose && 'active']">{{ item.StatusName }}</text>
  44. </view>
  45. </view>
  46. <!-- 活动列表 -->
  47. <view>
  48. <view class="collect-ul" v-if="haveData">
  49. <view class="collect-ltem" v-for="(item, index) in collectList" :key="index">
  50. <view class="title-date" @click="goDetail(item)">
  51. <text :class="item.ActivityType == 1 ? '' : 'xianxia'">{{ item.ActivityType == 1 ? "线上" : "线下" }}</text>
  52. {{ item.SourceType == 2 ? "" : item.ActivityTimeText }}
  53. <view class="audio-back" v-if="item.AudioLink" @click.stop="PlayBackAll(item)">
  54. <view class="audio-box">
  55. <block v-if="item.FileType == 2">
  56. <image class="audio-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/video_play.png"></image>
  57. </block>
  58. <image
  59. v-else
  60. class="audio-img"
  61. :src="
  62. curVoiceId === item.ActivityId && !curAudioPaused
  63. ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/stop_play.png'
  64. : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/audio_play.png'
  65. "
  66. ></image>
  67. {{ curVoiceId === item.ActivityId && !curAudioPaused ? "暂停" : "回放" }}
  68. </view>
  69. </view>
  70. </view>
  71. <view class="item-li">
  72. <view class="item-img" @click="goDetail(item)">
  73. <image :src="item.ImgUrl"></image>
  74. <text v-if="item.ActiveState == 1" class="img-status begin">未开始</text>
  75. <text v-else-if="item.ActiveState == 2" class="img-status proceed">进行中</text>
  76. <block v-else>
  77. <text v-if="item.TripStatus != 1" class="img-status">已结束</text>
  78. </block>
  79. <view class="img-type">
  80. <image :src="item.ImgUrlText" mode=""></image>
  81. </view>
  82. </view>
  83. <view class="item">
  84. <view class="item-text" @click="goDetail(item)">
  85. <text class="activity-title"> {{ item.ActivityName }} </text>
  86. <text class="text_twoLine" v-if="item.Expert && item.SourceType == 1">专家背景:{{ item.Expert }} </text>
  87. <text class="text_twoLine" v-if="item.DistinguishedGuest">嘉宾:{{ item.DistinguishedGuest }} </text>
  88. <text class="text_twoLine" v-if="item.Speaker">主讲人:{{ item.Speaker }}</text>
  89. <view style="display: flex" class="text_twoLine" v-if="item.ActivityTimeText && item.SourceType == 2">
  90. <text style="flex-shrink: 0"> 活动时间:</text>
  91. <text> {{ item.ActivityTimeText }}</text>
  92. </view>
  93. </view>
  94. <block v-if="item.SourceType == 1">
  95. <block v-if="item.ActiveState == 1">
  96. <view :class="['bottom-box', isEndBtn(item) > 3 && 'expert-item', item.City && 'city']">
  97. <view class="city-img" v-if="item.City">
  98. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  99. {{ item.City }}
  100. </view>
  101. <view style="display: flex">
  102. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId == 1" class="button" @click="signupIsAddOfCancel(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  103. <text v-if="item.IsShowAppointment" @click="summaryIsHandel(item)">{{ item.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  104. <text v-if="item.IsShowMeetingReminder" @click="meetingReminderAdd(item.ActivityId, item.IsCancelMeetingReminder)">
  105. {{ item.IsCancelMeetingReminder == 0 ? "消息提醒" : "取消提醒" }}
  106. </text>
  107. <view v-if="item.IsShowHelpSsk" style="width: 130rpx">
  108. <text @click="askingGo(item)">帮我带问</text>
  109. </view>
  110. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId != 1" class="button" @click="signupIsAddOfCancel(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  111. <text v-if="item.IsShowDetails" @click="goDetail(item)" class="button">查看详情</text>
  112. <block v-if="item.IsShowSignup">
  113. <block v-if="item.IsCClassMeeting">
  114. <text class="button" @click="signupIsAddOfCancel(item, 3, 'CClass')">{{ item.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  115. </block>
  116. <block v-else>
  117. <text class="button" v-if="item.IsSignup !== 1" @click="wanttosignup(item)">我要报名</text>
  118. <text class="button" v-else @click="signupIsAddOfCancel(item, 2)">{{ item.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
  119. </block>
  120. </block>
  121. </view>
  122. </view>
  123. </block>
  124. <block v-else>
  125. <view class="bottom-box city" v-if="item.City">
  126. <view class="city-img">
  127. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  128. {{ item.City }}
  129. </view>
  130. </view>
  131. <view class="bottom-box real-time" v-if="item.ActiveState == 2 && item.ActivityTypeId == 1">
  132. <text class="button" @click="askingGo(item, '提问')">实时提问</text>
  133. </view>
  134. </block>
  135. </block>
  136. <block v-if="item.SourceType == 2">
  137. <view class="bottom-box">
  138. <view class="" style="width: 130rpx"> </view>
  139. <text @click="lookImg(item)">行程安排</text>
  140. </view>
  141. </block>
  142. </view>
  143. </view>
  144. <view class="reminder-item" v-if="item.SourceType == 2">
  145. <image class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/confirm_XC.png"></image>
  146. </view>
  147. </view>
  148. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
  149. </view>
  150. <view class="nodata" v-else>
  151. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  152. <text>暂时没有符合条件的活动</text>
  153. </view>
  154. <view class="select-box">
  155. <u-popup v-model="selectShow" mode="bottom">
  156. <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
  157. <view style="color: #2c83ff" @click="signupIsAddOfCancel('', 1)">预约外呼</view>
  158. <view style="color: #2c83ff" @click="signupIsAddOfCancel('', 2)">自主拨入</view>
  159. <view style="color: #a9afb8" @click="selectShow = false">取消</view>
  160. </u-popup>
  161. </view>
  162. <!-- 所有自定义弹框 -->
  163. <modalDialog
  164. :isShow="isShow"
  165. :signupType="signupType"
  166. :goFollow="goFollow"
  167. :hasPermission="hasPermission"
  168. :jurisdictionList="jurisdictionList"
  169. :editIsShow="editIsShow"
  170. :isCancelShow="isCancelShow"
  171. :idTypeCancel="idTypeCancel"
  172. :countryCode="countryCode"
  173. :mobileEdit="mobileEdit"
  174. :goOnNextStep="goOnNextStep"
  175. :isShowhasPermission="isShowhasPermission"
  176. :applyForIsShow="applyForIsShow"
  177. :mailboxBinding="mailboxBinding"
  178. />
  179. </view>
  180. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  181. <view v-if="showAudioBox">
  182. <audioModule :showAudioPop.sync="showAudioPop" />
  183. </view>
  184. <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" />
  185. </view>
  186. </template>
  187. <script>
  188. import { activity, User } from "@/config/api.js";
  189. import { Throttle } from "@/config/util.js";
  190. import modalDialog from "@/components/modalDialog.vue";
  191. import myActivityMixin from "@/components/activity/indexActivity.js";
  192. import freeCharge from "@/components/freeCharge";
  193. import selectMixins from "../components/selectMixins.js";
  194. import audioModule from "@/components/audioModule/index";
  195. import mediaMixins from "@/components/activity/mediaMixins";
  196. import videoModule from "@/components/videoModule/index";
  197. export default {
  198. mixins: [myActivityMixin, selectMixins, mediaMixins],
  199. data() {
  200. return {
  201. hasPermission: "", //是否有权限
  202. contentImg: "",
  203. contentLabel: "",
  204. contentDetail: {},
  205. label: "",
  206. type: "",
  207. activityId: "",
  208. selectShow: false,
  209. haveData: true,
  210. isEndActivity: false,
  211. };
  212. },
  213. components: {
  214. modalDialog,
  215. freeCharge,
  216. audioModule,
  217. videoModule,
  218. },
  219. methods: {
  220. // 判断几个按钮
  221. isEndBtn(item) {
  222. let isKeys = ["IsShowOutboundCall", "IsShowAppointment", "IsShowMeetingReminder", "IsShowHelpSsk", "IsShowDetails", "IsShowSignup"];
  223. let arr = [];
  224. Object.keys(item).forEach((key) => {
  225. if (isKeys.includes(key)) {
  226. item[key] && arr.push(item[key]);
  227. }
  228. });
  229. return arr.length;
  230. },
  231. // 获取列表数据
  232. async getActivityList() {
  233. const res = await activity.getActivityListNew({
  234. PageSize: this.pageSize,
  235. CurrentIndex: this.page_no,
  236. Label: this.type ? "" : this.label,
  237. ActiveState: this.isEndActivity ? 3 : 1,
  238. ActivityTypeId: this.type ? this.label : "",
  239. ChartPermissionIds: this.chartPermissionIds,
  240. WhichDay: this.whichDay,
  241. ActivityId: this.activityId,
  242. TypeName: this.selectActiveId,
  243. });
  244. if (res.Ret === 200) {
  245. if (this.type) {
  246. uni.setNavigationBarTitle({
  247. title: this.type,
  248. });
  249. }
  250. this.contentImg = res.Data.ImgUrl;
  251. this.contentDetail = res.Data;
  252. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  253. if (this.page_no === 1) {
  254. this.collectList = res.Data.List || [];
  255. this.haveData = this.collectList.length ? true : false;
  256. if (this.refresh) {
  257. uni.stopPullDownRefresh();
  258. this.refresh = false;
  259. }
  260. } else {
  261. this.collectList = this.collectList.concat(res.Data.List);
  262. }
  263. }
  264. },
  265. // 点击了top的标签
  266. jumpHandler() {
  267. if (this.contentDetail.IsJump) {
  268. if (this.contentDetail.IsResearch) {
  269. //严选
  270. this.$store.dispatch("checkHandle", "/reportPages/researchTheme/researchTheme?id=" + this.contentDetail.IndustrialManagementId);
  271. } else {
  272. //非严选
  273. this.$store.dispatch("checkHandle", "/reportPages/IndustryReport/IndustryReport?id=" + this.contentDetail.IndustrialManagementId + "&entrance=活动详情");
  274. }
  275. }
  276. },
  277. // 进入页面的筛选的方法
  278. selectInitHandler(value, list) {
  279. list.forEach((item) => {
  280. if (value.includes(item.Id)) {
  281. item.IsChoose = true;
  282. }
  283. });
  284. },
  285. //查看行程的事件
  286. lookImg(item) {
  287. this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
  288. uni.previewImage({
  289. urls: [item.TripImgLink], //查看图片的数组
  290. });
  291. },
  292. // 进入页面的初始化
  293. loadInit(option) {
  294. this.label = option.title;
  295. this.type = option.type;
  296. this.chartPermissionIds = option.permissionIds || "";
  297. this.activityId = option.id;
  298. this.whichDay = option.whichDay || "";
  299. this.isShowJurisdiction = option.showJurisdiction == "show" ? true : false;
  300. this.isGetJurisdiction = this.isShowJurisdiction ? 1 : 2;
  301. this.whichDay && this.selectInitHandler(this.whichDay, this.activityTimeList);
  302. if (option.endList) {
  303. this.isEndActivity = true;
  304. let obj = JSON.parse(option.endList);
  305. this.whichDay = obj.data_activeId;
  306. this.selectActiveId = obj.select_activeId;
  307. this.selectInitHandler(this.whichDay, this.activityMonthWeekList);
  308. this.selectInitHandler(this.selectActiveId, this.activityTypeList);
  309. }
  310. this.getActivityList();
  311. },
  312. },
  313. onLoad(option) {
  314. this.loadInit(option);
  315. },
  316. onShow() {
  317. this.$store.commit("setRouterReport", "活动列表");
  318. this.$store.commit("setRouterActivity", "活动列表");
  319. this.$store.dispatch("checkHandle");
  320. this.$store.commit("audioBg/parseIntAudio", true);
  321. },
  322. onHide() {
  323. this.$store.commit("audioBg/parseIntAudio", false);
  324. },
  325. /* 触底 */
  326. onReachBottom: Throttle(function () {
  327. if (this.status === "nomore") return;
  328. this.status = "loading";
  329. this.page_no++;
  330. this.getActivityList();
  331. }),
  332. /* 下拉刷新 */
  333. onPullDownRefresh: Throttle(function () {
  334. this.page_no = 1;
  335. this.refresh = true;
  336. this.getActivityList();
  337. }),
  338. /** 用户点击分享 */
  339. onShareAppMessage: function (res) {
  340. return {
  341. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : this.type || this.label,
  342. path: "/activityPages/themeActivity/themeActivity?title=" + this.label + "&permissionIds=" + this.chartPermissionIds + "&whichDay=" + this.whichDay + "&type=" + this.type,
  343. };
  344. },
  345. };
  346. </script>
  347. <style lang="scss" scoped>
  348. .theme-container {
  349. background: #f7f7f7;
  350. padding-bottom: 30rpx;
  351. position: relative;
  352. .top-title {
  353. position: sticky;
  354. top: 0;
  355. z-index: 99;
  356. background-color: #fff;
  357. display: flex;
  358. align-items: center;
  359. color: #3385ff;
  360. font-size: 30rpx;
  361. padding: 30rpx 30rpx 20rpx;
  362. border-bottom: 2rpx solid #dcdfe6;
  363. .content-title {
  364. display: flex;
  365. align-items: center;
  366. .jump-text {
  367. margin-left: 10rpx;
  368. font-size: 24rpx;
  369. color: #3385ff;
  370. }
  371. .jump-label {
  372. font-size: 28rpx;
  373. padding: 6rpx 18rpx;
  374. background-color: #3385ff;
  375. border-radius: 52rpx;
  376. color: #fff;
  377. }
  378. .new_icon {
  379. width: 60rpx;
  380. height: 30rpx;
  381. margin-left: 10rpx;
  382. }
  383. }
  384. .jump-title {
  385. .jump-label {
  386. background-color: #f8f8fa;
  387. color: #999;
  388. }
  389. }
  390. }
  391. .collect-ul {
  392. padding-top: 10rpx;
  393. }
  394. .end-select-item {
  395. justify-content: flex-start !important;
  396. .select-item-multiple {
  397. margin-right: 38rpx;
  398. }
  399. }
  400. @import "../components/selectCss.scss";
  401. @import "@/components/activity/indexActivity.scss";
  402. .title-date {
  403. position: relative;
  404. .audio-back {
  405. position: absolute;
  406. right: 0;
  407. top: 50%;
  408. transform: translateY(-50%);
  409. width: 125rpx;
  410. height: 90rpx;
  411. font-size: 24rpx;
  412. display: flex;
  413. align-items: center;
  414. justify-content: flex-end;
  415. color: #fff;
  416. .audio-box {
  417. width: 99rpx;
  418. height: 39rpx;
  419. display: flex;
  420. align-items: center;
  421. border-radius: 20rpx;
  422. padding-left: 4rpx;
  423. background-color: #3385ff;
  424. }
  425. }
  426. .audio-img {
  427. width: 30rpx;
  428. height: 30rpx;
  429. margin: 0 5rpx;
  430. }
  431. }
  432. }
  433. </style>