themeActivity.vue 20 KB

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