mySchedulepage.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <view class="container activity-content">
  3. <view class="collect-ul" v-if="haveData">
  4. <view class="collect-ltem global_card_content" v-for="(item, index) in collectList" :key="index">
  5. <view class="reminder-item" v-if="item.SourceType == 2">
  6. <image class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/trip_icon.png"></image>
  7. </view>
  8. <view class="title-date" @click="goDetail(item)">
  9. <text :class="item.ActivityType == 1 ? '' : 'xianxia'">{{ item.ActivityType == 1 ? "线上" : "线下" }}</text>
  10. {{ item.SourceType == 2 ? "" : item.ActivityTimeText }}
  11. <view class="audio-back" v-if="item.AudioLink" @click.stop="PlayBackAll(item)">
  12. <block v-if="item.FileType == 2">
  13. <image class="audio-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/video_play.png"></image>
  14. </block>
  15. <image
  16. v-else
  17. class="audio-img"
  18. :src="
  19. curVoiceId === item.ActivityId && !curAudioPaused
  20. ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/stop_play.png'
  21. : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/audio_play.png'
  22. "
  23. ></image>
  24. {{ curVoiceId === item.ActivityId && !curAudioPaused ? "暂停" : "回放" }}
  25. </view>
  26. </view>
  27. <view class="item-li">
  28. <view class="item-img" @click="goDetail(item)">
  29. <image :src="item.ImgUrl"></image>
  30. <image v-if="item.ActiveState == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/not_started_activity.png" class="img-status"></image>
  31. <image v-else-if="item.ActiveState == 2" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/in_progress_activity.png" class="img-status"></image>
  32. <block v-else>
  33. <image v-if="item.TripStatus != 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/end_activity.png" class="img-status"></image>
  34. </block>
  35. <view class="img-type">
  36. <image :src="item.ImgUrlText" mode=""></image>
  37. </view>
  38. </view>
  39. <view class="item">
  40. <view class="item-text" @click="goDetail(item)">
  41. <view class="activity-title text_twoLine">
  42. <image v-if="item.IsResearchPoints" src="https://hzstatic.hzinsights.com/cygx/icon/Research_Points.png"></image>
  43. <image v-else-if="item.IsResearch" src="https://hzstatic.hzinsights.com/cygx/icon/Research_normal.png"></image>
  44. <image v-else-if="item.IsExternalLabel" src="https://hzstatic.hzinsights.com/cygx/icon/activity_external.png"></image>
  45. {{ item.ActivityName }}
  46. </view>
  47. <text class="global_activity_content text_twoLine" v-if="item.Expert && item.SourceType == 1">专家背景:{{ item.Expert }} </text>
  48. <text class="global_activity_content text_twoLine" v-if="item.DistinguishedGuest">嘉宾:{{ item.DistinguishedGuest }} </text>
  49. <text class="global_activity_content text_twoLine" v-if="item.Speaker">主讲人:{{ item.Speaker }}</text>
  50. <view style="display: flex" class="global_activity_content text_twoLine" v-if="item.ActivityTimeText && item.SourceType == 2">
  51. <text style="flex-shrink: 0"> 活动时间:</text>
  52. <text> {{ item.ActivityTimeText }}</text>
  53. </view>
  54. </view>
  55. <block v-if="item.SourceType == 1">
  56. <block v-if="item.ActiveState == 1">
  57. <view :class="['bottom-box', isEndBtn(item) > 3 && 'expert-item', item.City && 'city']">
  58. <view class="city-img" v-if="item.City">
  59. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/position.png"></image>
  60. {{ item.City }}
  61. </view>
  62. <view style="display: flex">
  63. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId == 1" class="button" @click="signupIsAddOfCancel(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  64. <text v-if="item.IsShowAppointment" @click="summaryIsHandel(item)">{{ item.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  65. <text v-if="item.IsShowMeetingReminder" @click="meetingReminderAdd(item.ActivityId, item.IsCancelMeetingReminder)">
  66. {{ item.IsCancelMeetingReminder == 0 ? "消息提醒" : "取消提醒" }}
  67. </text>
  68. <text v-if="item.IsShowHelpSsk" @click="askingGo(item)">帮我带问</text>
  69. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId != 1" class="button" @click="signupIsAddOfCancel(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  70. <text v-if="item.IsShowDetails" @click="goDetail(item)" class="button">查看详情</text>
  71. <block v-if="item.IsShowSignup">
  72. <block v-if="item.IsCClassMeeting && !item.IsYidongConduct">
  73. <text class="button" @click="signupIsAddOfCancel(item, 3, 'CClass')">{{ item.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  74. </block>
  75. <block v-else>
  76. <text class="button" v-if="item.IsSignup !== 1" @click="wanttosignup(item)">我要报名</text>
  77. <text class="button" v-else @click="signupIsAddOfCancel(item, 2)">{{ item.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
  78. </block>
  79. </block>
  80. </view>
  81. </view>
  82. </block>
  83. <block v-else>
  84. <view class="bottom-box city" v-if="item.City">
  85. <view class="city-img">
  86. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/position.png"></image>
  87. {{ item.City }}
  88. </view>
  89. </view>
  90. <view class="bottom-box real-time" v-if="item.ActiveState == 2 && item.ActivityTypeId == 1">
  91. <text class="button" @click="askingGo(item, '提问')">实时提问</text>
  92. </view>
  93. </block>
  94. </block>
  95. <block v-if="item.SourceType == 2">
  96. <view class="bottom-box">
  97. <view class="" style="width: 130rpx"> </view>
  98. <text @click="lookImg(item)">行程安排</text>
  99. <text v-if="item.ActiveState == 1" class="button" @click="applyOfcancel(item, index)">{{ item.IsSignup == 0 ? "我要报名" : "取消报名" }}</text>
  100. </view>
  101. </block>
  102. </view>
  103. </view>
  104. </view>
  105. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
  106. </view>
  107. <view class="nodata" v-if="!haveData">
  108. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  109. <text>{{ tabsActive == 0 ? "暂时没有符合条件的活动" : "暂无我的日程" }}</text>
  110. </view>
  111. <!-- 所有自定义弹框 -->
  112. <modalDialog
  113. :isShow="isShow"
  114. :signupType="signupType"
  115. :goFollow="goFollow"
  116. :hasPermission="hasPermission"
  117. :jurisdictionList="jurisdictionList"
  118. :editIsShow="editIsShow"
  119. :isCancelShow="isCancelShow"
  120. :idTypeCancel="idTypeCancel"
  121. :countryCode="countryCode"
  122. :mobileEdit="mobileEdit"
  123. :goOnNextStep="goOnNextStep"
  124. :isShowhasPermission="isShowhasPermission"
  125. :applyForIsShow="applyForIsShow"
  126. :mailboxBinding="mailboxBinding"
  127. />
  128. <SelectPopup :selectShow.sync="selectShow" @signupIsAddOfCancel="signupIsAddOfCancel" :selectYdong="selectYdong" />
  129. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  130. <view v-if="showAudioBox">
  131. <audioModule :showAudioPop.sync="showAudioPop" />
  132. </view>
  133. <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" />
  134. <ShowResearchDlg :isResearchModalShow.sync="isResearchModalShow" :jurisdictionList="jurisdictionList" :checkResearchList.sync="checkResearchList" />
  135. <Loading />
  136. </view>
  137. </template>
  138. <script>
  139. import { activity } from "@/config/api.js";
  140. import { Throttle } from "@/config/util.js";
  141. import myActivityMixin from "@/components/activity/indexActivity.js";
  142. import modalDialog from "@/components/modalDialog.vue";
  143. import freeCharge from "@/components/freeCharge";
  144. import audioModule from "@/components/audioModule/index";
  145. import mediaMixins from "@/components/activity/mediaMixins";
  146. import videoModule from "@/components/videoModule/index";
  147. import SelectPopup from "@/components/activity/selectPopup";
  148. import ShowResearchDlg from "@/components/activity/showResearchDlg.vue";
  149. let app = getApp();
  150. export default {
  151. mixins: [myActivityMixin, mediaMixins],
  152. components: {
  153. modalDialog,
  154. freeCharge,
  155. audioModule,
  156. videoModule,
  157. SelectPopup,
  158. ShowResearchDlg,
  159. },
  160. data() {
  161. return {
  162. isGetJurisdiction: 0,
  163. whichDay: "",
  164. chartPermissionIds: "",
  165. activityTypeId: "",
  166. haveData: true,
  167. isShowJurisdiction: false, //
  168. isrefresh: true,
  169. listChartPermission: [],
  170. listChartPermissionInit: [],
  171. collectTypeList: [],
  172. isResearchModalShow: false,
  173. checkResearchList: {},
  174. };
  175. },
  176. methods: {
  177. // 判断几个按钮
  178. isEndBtn(item) {
  179. let isKeys = ["IsShowOutboundCall", "IsShowAppointment", "IsShowMeetingReminder", "IsShowHelpSsk", "IsShowDetails", "IsShowSignup"];
  180. let arr = [];
  181. Object.keys(item).forEach((key) => {
  182. if (isKeys.includes(key)) {
  183. item[key] && arr.push(item[key]);
  184. }
  185. });
  186. return arr.length;
  187. },
  188. //获取数据
  189. async getActivityList() {
  190. const res = await activity.getScheduleList({ PageSize: this.pageSize, CurrentIndex: this.page_no });
  191. if (res.Ret === 200) {
  192. this.contentImg = res.Data.ImgUrl;
  193. this.contentLabel = res.Data.Label;
  194. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  195. if (this.page_no === 1) {
  196. this.collectList = res.Data.List || [];
  197. this.haveData = this.collectList.length ? true : false;
  198. if (this.refresh) {
  199. uni.stopPullDownRefresh();
  200. this.refresh = false;
  201. }
  202. } else {
  203. this.collectList = this.collectList.concat(res.Data.List);
  204. }
  205. }
  206. },
  207. //查看行程的事件
  208. lookImg(item) {
  209. this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
  210. uni.previewImage({
  211. urls: [item.TripImgLink], //查看图片的数组
  212. });
  213. },
  214. //报名或者取消报名
  215. async applyOfcancel(item, index) {
  216. const str = item.ActivityTime.replace(/-/g, "/");
  217. const date = new Date(str);
  218. const times = date.getTime();
  219. const num = new Date().getTime();
  220. let twoDays = times - num <= 3600000 * 48;
  221. uni.showModal({
  222. content: twoDays ? "活动开始前48小时内,取消报名仍会维持扣点,确定要取消报名吗?" : "您要取消此次专项调研的预报名吗?",
  223. confirmColor: "#376cbb",
  224. cancelColor: "#606266",
  225. success: async (res) => {
  226. if (res.confirm) {
  227. const res = await activity.activityApecialCancel({
  228. ActivityId: item.ActivityId,
  229. PageRouter: this.$store.state.pageRouterActivity,
  230. });
  231. if (res.Ret === 200) {
  232. uni.showToast({
  233. title: res.Msg,
  234. duration: 2000,
  235. });
  236. this.collectList.splice(index, 1);
  237. }
  238. }
  239. },
  240. });
  241. },
  242. },
  243. //load
  244. onLoad(option) {
  245. this.$store.commit("setRouterActivity", "我的日程");
  246. this.getActivityList();
  247. },
  248. async onShow() {
  249. this.$store.commit("audioBg/parseIntAudio", true);
  250. },
  251. onHide() {
  252. this.$store.commit("audioBg/parseIntAudio", false);
  253. },
  254. /* 触底 */
  255. onReachBottom: Throttle(function () {
  256. if (this.status === "nomore") return;
  257. this.status = "loading";
  258. this.page_no++;
  259. this.getActivityList();
  260. }),
  261. /* 下拉刷新 */
  262. onPullDownRefresh: Throttle(function () {
  263. this.page_no = 1;
  264. this.refresh = true;
  265. this.getActivityList();
  266. }),
  267. };
  268. </script>
  269. <style scoped lang="scss">
  270. .activity-content {
  271. background-color: $uni-bg-color;
  272. padding-bottom: 90rpx;
  273. position: relative;
  274. padding-top: 20rpx;
  275. .nodata_ico {
  276. width: 374rpx;
  277. height: 288rpx;
  278. }
  279. .title-date {
  280. position: relative;
  281. .audio-back {
  282. position: absolute;
  283. right: 0;
  284. top: 50%;
  285. transform: translateY(-50%);
  286. width: 99rpx;
  287. height: 39rpx;
  288. font-size: 24rpx;
  289. color: #fff;
  290. display: flex;
  291. align-items: center;
  292. background-color: #376cbb;
  293. border-radius: 20rpx;
  294. padding-left: 4rpx;
  295. .audio-img {
  296. width: 30rpx;
  297. height: 30rpx;
  298. margin: 0 5rpx;
  299. }
  300. }
  301. }
  302. }
  303. @import "@/components/activity/indexActivity.scss";
  304. </style>