mySchedulepage.vue 13 KB

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