mySchedulepage.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  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" :checkResearchList.sync="checkResearchList" />
  132. <Loading />
  133. </view>
  134. </template>
  135. <script>
  136. import { activity } from "@/config/api.js";
  137. import { Throttle } from "@/config/util.js";
  138. import myActivityMixin from "@/components/activity/indexActivity.js";
  139. import modalDialog from "@/components/modalDialog.vue";
  140. import freeCharge from "@/components/freeCharge";
  141. import audioModule from "@/components/audioModule/index";
  142. import mediaMixins from "@/components/activity/mediaMixins";
  143. import videoModule from "@/components/videoModule/index";
  144. import SelectPopup from "@/components/activity/selectPopup";
  145. import ShowResearchDlg from "@/components/activity/showResearchDlg.vue";
  146. let app = getApp();
  147. export default {
  148. mixins: [myActivityMixin, mediaMixins],
  149. components: {
  150. modalDialog,
  151. freeCharge,
  152. audioModule,
  153. videoModule,
  154. SelectPopup,
  155. ShowResearchDlg,
  156. },
  157. data() {
  158. return {
  159. isGetJurisdiction: 0,
  160. whichDay: "",
  161. chartPermissionIds: "",
  162. activityTypeId: "",
  163. haveData: true,
  164. isShowJurisdiction: false, //
  165. isrefresh: true,
  166. listChartPermission: [],
  167. listChartPermissionInit: [],
  168. collectTypeList: [],
  169. isResearchModalShow: false,
  170. checkResearchList: {},
  171. };
  172. },
  173. methods: {
  174. // 判断几个按钮
  175. isEndBtn(item) {
  176. let isKeys = ["IsShowOutboundCall", "IsShowAppointment", "IsShowMeetingReminder", "IsShowHelpSsk", "IsShowDetails", "IsShowSignup"];
  177. let arr = [];
  178. Object.keys(item).forEach((key) => {
  179. if (isKeys.includes(key)) {
  180. item[key] && arr.push(item[key]);
  181. }
  182. });
  183. return arr.length;
  184. },
  185. //获取数据
  186. async getActivityList() {
  187. const res = await activity.getScheduleList({ PageSize: this.pageSize, CurrentIndex: this.page_no });
  188. if (res.Ret === 200) {
  189. this.contentImg = res.Data.ImgUrl;
  190. this.contentLabel = res.Data.Label;
  191. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  192. if (this.page_no === 1) {
  193. this.collectList = res.Data.List || [];
  194. this.haveData = this.collectList.length ? true : false;
  195. if (this.refresh) {
  196. uni.stopPullDownRefresh();
  197. this.refresh = false;
  198. }
  199. } else {
  200. this.collectList = this.collectList.concat(res.Data.List);
  201. }
  202. }
  203. },
  204. //查看行程的事件
  205. lookImg(item) {
  206. this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
  207. uni.previewImage({
  208. urls: [item.TripImgLink], //查看图片的数组
  209. });
  210. },
  211. //报名或者取消报名
  212. async applyOfcancel(item, index) {
  213. const str = item.ActivityTime.replace(/-/g, "/");
  214. const date = new Date(str);
  215. const times = date.getTime();
  216. const num = new Date().getTime();
  217. let twoDays = times - num <= 3600000 * 48;
  218. uni.showModal({
  219. content: twoDays ? "活动开始前48小时内,取消报名仍会维持扣点,确定要取消报名吗?" : "您要取消此次专项调研的预报名吗?",
  220. confirmColor: "#3385FF",
  221. cancelColor: "#606266",
  222. success: async (res) => {
  223. if (res.confirm) {
  224. const res = await activity.activityApecialCancel({
  225. ActivityId: item.ActivityId,
  226. PageRouter: this.$store.state.pageRouterActivity,
  227. });
  228. if (res.Ret === 200) {
  229. uni.showToast({
  230. title: res.Msg,
  231. duration: 2000,
  232. });
  233. this.collectList.splice(index, 1);
  234. }
  235. }
  236. },
  237. });
  238. },
  239. },
  240. //load
  241. onLoad(option) {
  242. this.$store.commit("setRouterActivity", "我的日程");
  243. this.getActivityList();
  244. },
  245. async onShow() {
  246. this.$store.commit("audioBg/parseIntAudio", true);
  247. },
  248. onHide() {
  249. this.$store.commit("audioBg/parseIntAudio", false);
  250. },
  251. /* 触底 */
  252. onReachBottom: Throttle(function () {
  253. if (this.status === "nomore") return;
  254. this.status = "loading";
  255. this.page_no++;
  256. this.getActivityList();
  257. }),
  258. /* 下拉刷新 */
  259. onPullDownRefresh: Throttle(function () {
  260. this.page_no = 1;
  261. this.refresh = true;
  262. this.getActivityList();
  263. }),
  264. };
  265. </script>
  266. <style scoped lang="scss">
  267. .activity-content {
  268. background-color: #f7f7f7;
  269. padding-bottom: 90rpx;
  270. position: relative;
  271. padding-top: 20rpx;
  272. .nodata_ico {
  273. width: 374rpx;
  274. height: 288rpx;
  275. }
  276. .title-date {
  277. position: relative;
  278. .audio-back {
  279. position: absolute;
  280. right: 0;
  281. top: 50%;
  282. transform: translateY(-50%);
  283. width: 99rpx;
  284. height: 39rpx;
  285. font-size: 24rpx;
  286. color: #fff;
  287. display: flex;
  288. align-items: center;
  289. background-color: #3385ff;
  290. border-radius: 20rpx;
  291. padding-left: 4rpx;
  292. .audio-img {
  293. width: 30rpx;
  294. height: 30rpx;
  295. margin: 0 5rpx;
  296. }
  297. }
  298. }
  299. }
  300. @import "@/components/activity/indexActivity.scss";
  301. </style>