mySchedulepage.vue 12 KB

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