themeActivity.vue 19 KB

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