mySchedulepage.vue 13 KB

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