purchaserActivityList.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <template>
  2. <block v-if="isLoad">
  3. <view class="purchaser-activity-list" v-if="collectList && collectList.length > 0">
  4. <view class="purchaser-activity-box" v-for="item in collectList" :key="item.ActivityId" :style="{ 'border-color': item.ActivityType == 1 ? '#8FA4C4' : '#E7E0CD' }">
  5. <view class="purchaser-activity-state">
  6. <image v-if="item.ActiveState == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/not_started_activity.png" class="img-status"></image>
  7. <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>
  8. <image v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/end_activity.png" class="img-status"></image>
  9. </view>
  10. <view class="purchaser-activity-head">
  11. <text :class="item.ActivityType == 1 ? 'online' : 'offline'" class="activity-which-line">{{ item.ActivityType == 1 ? "线上" : "线下" }}</text>
  12. <text class="activity-label-text">
  13. {{ item.ActivityTypeName }}
  14. </text>
  15. <text class="activity-label-text">
  16. {{ item.Label }}
  17. </text>
  18. </view>
  19. <view class="activity-title text_twoLine" @click="goDetailCheck(item)">
  20. <image class="recommend-icon" v-if="item.TopTime > 0 && item.ActiveState == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/recommend_YX.png"></image>
  21. <image v-if="item.IsResearchPoints" src="https://hzstatic.hzinsights.com/cygx/icon/Research_Points.png"></image>
  22. <image v-else-if="item.IsExternalLabel" src="https://hzstatic.hzinsights.com/cygx/icon/activity_external.png"></image>
  23. {{ item.ActivityName }}
  24. </view>
  25. <view class="activity-time-city-row" @click="goDetailCheck(item)">
  26. <text class="activity-time">{{ item.SourceType == 2 ? "" : item.ActivityTimeText }}</text>
  27. <view class="activity-city" v-if="item.City">
  28. <image src="https://hzstatic.hzinsights.com/cygx/icon/location-new.png"></image>
  29. {{ item.City }}
  30. </view>
  31. </view>
  32. <view class="activity-buttons-row" v-if="isUserBindingPhoneNumber">
  33. <block v-if="item.ActiveState == 1">
  34. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId == 1" class="main-button" @click="signupCheck(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  35. <text v-if="item.IsShowAppointment" @click="summaryHandelCheck(item)">{{ item.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  36. <text v-if="item.IsShowMeetingReminder" @click="meetingReminderCheck(item.ActivityId, item.IsCancelMeetingReminder)">
  37. {{ item.IsCancelMeetingReminder == 0 ? "消息提醒" : "取消提醒" }}
  38. </text>
  39. <text v-if="item.IsShowHelpSsk" @click="askingCheck(item)">帮我带问</text>
  40. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId != 1" class="main-button" @click="signupCheck(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  41. <text v-if="item.IsShowDetails" @click="goDetailCheck(item)" class="main-button">查看详情</text>
  42. <block v-if="item.IsShowSignup">
  43. <block v-if="item.IsCClassMeeting && !item.IsYidongConduct">
  44. <text class="main-button" @click="signupCheck(item, 3, 'CClass')">{{ item.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  45. </block>
  46. <block v-else>
  47. <text class="main-button" v-if="item.IsSignup !== 1" @click="wanttosignupCheck(item)">我要报名</text>
  48. <text class="main-button" v-else @click="signupCheck(item, 2)">{{ item.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
  49. </block>
  50. </block>
  51. </block>
  52. <view class="bottom-box real-time" v-if="item.ActiveState == 2 && item.ActivityTypeId == 1">
  53. <text class="main-button" @click="askingCheck(item, '提问')">实时提问</text>
  54. </view>
  55. </view>
  56. </view>
  57. <slot name="finished"></slot>
  58. <SelectPopup :selectShow.sync="selectShow" @signupIsAddOfCancel="signupIsAddOfCancel" :selectYdong="selectYdong" />
  59. <!-- 所有自定义弹框 -->
  60. <modalDialog
  61. :isShow="isShow"
  62. :signupType="signupType"
  63. :goFollow="goFollow"
  64. :hasPermission="hasPermission"
  65. :jurisdictionList="jurisdictionList"
  66. :editIsShow="editIsShow"
  67. :isCancelShow="isCancelShow"
  68. :idTypeCancel="idTypeCancel"
  69. :countryCode="countryCode"
  70. :mobileEdit="mobileEdit"
  71. :goOnNextStep="goOnNextStep"
  72. :isShowhasPermission="isShowhasPermission"
  73. :applyForIsShow="applyForIsShow"
  74. :mailboxBinding="mailboxBinding"
  75. />
  76. <ShowResearchDlg :isResearchModalShow.sync="isResearchModalShow" :jurisdictionList="jurisdictionList" :checkResearchList.sync="checkResearchList" />
  77. </view>
  78. <slot v-else></slot>
  79. </block>
  80. <view v-else> </view>
  81. </template>
  82. <script>
  83. import myActivityMixin from "@/components/activity/indexActivity.js";
  84. import modalDialog from "@/components/modalDialog.vue";
  85. import SelectPopup from "@/components/activity/selectPopup";
  86. import { activity } from "@/config/api.js";
  87. import ShowResearchDlg from "@/components/activity/showResearchDlg.vue";
  88. export default {
  89. mixins: [myActivityMixin],
  90. components: { modalDialog, SelectPopup, ShowResearchDlg },
  91. props: {
  92. // 1-未开始、进行中 0-已结束
  93. activityType: {
  94. type: Number,
  95. default: 1,
  96. },
  97. whichDay: {
  98. type: String,
  99. default: "",
  100. },
  101. typeName: {
  102. type: String,
  103. default: "",
  104. },
  105. },
  106. data() {
  107. return {
  108. pageSize: 10,
  109. page_no: 1,
  110. collectList: [],
  111. pages: 0,
  112. isLoad: false,
  113. };
  114. },
  115. methods: {
  116. // 获取列表数据
  117. async getActivityList() {
  118. const res = await activity.getActivityListNew({
  119. PageSize: this.pageSize,
  120. CurrentIndex: this.page_no,
  121. IsResearch: true,
  122. ActiveState: this.activityType == 1 ? "" : 3,
  123. WhichDay: this.whichDay,
  124. ActivityTypeId: this.typeName,
  125. });
  126. if (res.Ret === 200) {
  127. if (this.page_no === 1) {
  128. this.collectList = res.Data.List || [];
  129. } else {
  130. this.collectList = this.collectList.concat(res.Data.List || []);
  131. }
  132. this.pages = res.Data.Paging.Pages || 0;
  133. this.isLoad = true;
  134. }
  135. },
  136. reloadActivityList() {
  137. this.page_no = 1;
  138. this.getActivityList();
  139. },
  140. loadActivityMore() {
  141. this.page_no++;
  142. this.getActivityList();
  143. },
  144. },
  145. created() {
  146. // this.getActivityList()
  147. },
  148. };
  149. </script>
  150. <style scoped lang="scss">
  151. // 从查研观向11.0 版本开始陆续更换各个页面的页面主题。先从研选页面开始
  152. .purchaser-activity-box {
  153. width: 100%;
  154. padding: 40rpx 20rpx 30rpx;
  155. border-top: solid 10rpx;
  156. border-radius: 16rpx;
  157. background-color: white;
  158. margin-bottom: 20rpx;
  159. position: relative;
  160. .purchaser-activity-state {
  161. position: absolute;
  162. top: 0;
  163. right: 0;
  164. z-index: 2;
  165. width: 100%;
  166. display: flex;
  167. justify-content: flex-end;
  168. height: 42rpx;
  169. image {
  170. width: 122rpx;
  171. height: 42rpx;
  172. }
  173. }
  174. .purchaser-activity-head {
  175. display: flex;
  176. align-items: center;
  177. margin-bottom: 40rpx;
  178. .activity-which-line {
  179. min-width: 110rpx;
  180. height: 40rpx;
  181. border-radius: 4rpx;
  182. font-size: 24rpx;
  183. line-height: 34rpx;
  184. display: flex;
  185. align-items: center;
  186. justify-content: center;
  187. color: #333333;
  188. font-weight: 500;
  189. }
  190. .online {
  191. background-color: #dfe8ff;
  192. }
  193. .offline {
  194. background-color: #f2e8cc;
  195. }
  196. .activity-label-text {
  197. white-space: nowrap;
  198. margin-left: 20rpx;
  199. background-color: #f0f1f3;
  200. color: #333333;
  201. font-weight: 400;
  202. font-size: 24rpx;
  203. line-height: 34rpx;
  204. height: 40rpx;
  205. min-width: 154rpx;
  206. padding: 0 12rpx;
  207. border-radius: 40rpx;
  208. display: flex;
  209. align-items: center;
  210. justify-content: center;
  211. &:last-child {
  212. overflow: hidden;
  213. text-overflow: ellipsis;
  214. white-space: nowrap;
  215. display: block;
  216. padding: 4rpx 12rpx;
  217. text-align: center;
  218. }
  219. }
  220. }
  221. .activity-title {
  222. font-weight: 700;
  223. margin-bottom: 20rpx;
  224. image {
  225. width: 73rpx;
  226. height: 30rpx;
  227. vertical-align: bottom;
  228. margin-right: 8rpx;
  229. margin-bottom: 4rpx;
  230. }
  231. .recommend-icon {
  232. width: 30rpx;
  233. height: 30rpx;
  234. }
  235. }
  236. .activity-time-city-row {
  237. display: flex;
  238. margin-bottom: 40rpx;
  239. .activity-time {
  240. font-size: 24rpx;
  241. font-weight: 400;
  242. line-height: 34rpx;
  243. color: #333333;
  244. margin-right: 20rpx;
  245. white-space: nowrap;
  246. }
  247. .activity-city {
  248. display: flex;
  249. align-items: center;
  250. font-size: 24rpx;
  251. line-height: 34rpx;
  252. color: #376cbb;
  253. overflow: hidden;
  254. image {
  255. height: 24rpx;
  256. min-width: 24rpx;
  257. width: 24rpx;
  258. }
  259. text {
  260. white-space: nowrap;
  261. overflow: hidden;
  262. text-overflow: ellipsis;
  263. }
  264. }
  265. }
  266. .activity-buttons-row {
  267. display: flex;
  268. align-items: center;
  269. justify-content: flex-end;
  270. text {
  271. height: 52rpx;
  272. min-width: 136rpx;
  273. width: 136rpx;
  274. padding: 4rpx 20rpx;
  275. box-sizing: border-box;
  276. color: #376cbb;
  277. background-color: white;
  278. border: solid 2rpx #376cbb;
  279. white-space: nowrap;
  280. font-size: 24rpx;
  281. line-height: 44rpx;
  282. margin-left: 20rpx;
  283. border-radius: 52rpx;
  284. }
  285. .main-button {
  286. color: white;
  287. background-color: #376cbb;
  288. }
  289. }
  290. }
  291. </style>