activityItem.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. <template>
  2. <view class="container-activity-item" @click="goDetail(list)">
  3. <image v-if="list.IsResearchPoints" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/research_points.png" class="content-img"></image>
  4. <block v-else>
  5. <image v-if="list.TripStatus == 2" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/trip_icon.png" class="content-img"></image>
  6. <image v-if="list.TripStatus == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/Ybm.png" class="content-img"></image>
  7. </block>
  8. <view class="content-sign">
  9. <view :class="[list.ActivityType === 0 ? 'is-down' : 'is-up', 'is-up-down', 'global_content_center']">{{ list.ActivityType === 0 ? "线下" : "线上" }}</view>
  10. <image
  11. v-if="list.ActiveState == 1 || list.ActiveState == 2"
  12. :src="
  13. list.ActiveState == 1 ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/not_started_activity.png' : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/in_progress_activity.png'
  14. "
  15. ></image>
  16. <block v-else>
  17. <image v-if="list.TripStatus != 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/end_activity.png"></image>
  18. </block>
  19. </view>
  20. <view class="content-type global_title">
  21. <view>
  22. {{ list.ActivityTypeName || "专项产业调研" }}
  23. </view>
  24. <view v-if="list.ResearchTheme && list.City" class="content-city">
  25. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/position.png"></image>
  26. {{ list.City }}
  27. </view>
  28. </view>
  29. <view class="content-title" v-if="list.ActivityName || list.ResearchTheme">
  30. <mp-html :content="richTextClamp(3) + (list.ActivityName || list.ResearchTheme) + '</div>'" />
  31. </view>
  32. <view style="display: flex" class="content-text text_twoLine" v-if="list.ActivityTimeText && list.SourceType !== 1">
  33. <text> 活动时间:{{ list.ActivityTimeText }}</text>
  34. </view>
  35. <view class="content-text text-Line" v-else>
  36. {{ list.Host ? "主持人:" : list.Expert ? "专家背景:" : list.Speaker ? "主讲人:" : list.DistinguishedGuest ? "嘉宾:" : "" }}
  37. {{ list.Host ? list.Host : list.Expert ? list.Expert : list.Speaker ? list.Speaker : list.DistinguishedGuest ? list.DistinguishedGuest : "" }}
  38. </view>
  39. <view class="content-time" v-if="list.SourceType == 1">
  40. {{ list.ActivityTimeText }}
  41. </view>
  42. <view v-if="list.City && !list.ResearchTheme" class="content-city">
  43. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/position.png"></image>
  44. {{ list.City }}
  45. </view>
  46. <view :class="['content-btn', isEndBtnSlide(list) > 2 && 'content-btn-end']" v-if="isUserBindingPhoneNumber">
  47. <block v-if="list.SourceType === 1">
  48. <block v-if="list.ActiveState == 1">
  49. <text class="item-btn btn-solid" v-if="list.IsShowOutboundCall && list.ActivityTypeId == 1" @click.stop="signupIsAddOfCancel(list, 1)">{{
  50. list.IsSignup == 1 ? "取消外呼" : "预约外呼"
  51. }}</text>
  52. <text class="item-btn" v-if="list.IsShowAppointment" @click.stop="summaryIsHandel(list)">{{ list.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  53. <text class="item-btn" v-if="list.IsShowMeetingReminder" @click.stop="meetingReminderAdd(list, list.IsCancelMeetingReminder)">
  54. {{ list.IsCancelMeetingReminder == 0 ? "消息提醒" : "取消提醒" }}
  55. </text>
  56. <view class="item-btn" v-if="list.IsShowHelpSsk" style="width: 130rpx">
  57. <text @click.stop="askingGo(list)">帮我带问</text>
  58. </view>
  59. <text class="item-btn btn-solid" v-if="list.IsShowOutboundCall && list.ActivityTypeId != 1" @click.stop="signupIsAddOfCancel(list, 1)">{{
  60. list.IsSignup == 1 ? "取消外呼" : "预约外呼"
  61. }}</text>
  62. <text class="item-btn" v-if="list.IsShowDetails" @click.stop="goDetail(list)">查看详情</text>
  63. <block v-if="list.IsShowSignup">
  64. <block v-if="list.IsCClassMeeting && !list.IsYidongConduct">
  65. <text class="item-btn btn-solid" @click.stop="signupIsAddOfCancel(list, 3, 'CClass')">{{ list.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  66. </block>
  67. <block v-else>
  68. <text class="item-btn btn-solid" v-if="list.IsSignup !== 1" @click.stop="wanttosignup(list)">我要报名</text>
  69. <text class="item-btn btn-solid" v-else @click.stop="signupIsAddOfCancel(list, 2)">{{ list.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
  70. </block>
  71. </block>
  72. </block>
  73. <text v-if="list.IsShowHelpSsk && list.ActiveState == 2" class="item-btn" @click.stop="askingGo(list, '提问')">实时提问</text>
  74. </block>
  75. <view class="bottom-box real-time" v-else>
  76. <view class="bottom-box">
  77. <view class="" style="width: 130rpx"> </view>
  78. <text class="item-btn" @click.stop="lookImg(list)">行程安排</text>
  79. <block v-if="list.TripStatus == 2">
  80. <text v-if="list.ActiveState == 1" class="item-btn btn-solid" @click.stop="applyOfcancel(list)">{{ list.IsTrip == 0 ? "我要报名" : "取消报名" }}</text>
  81. </block>
  82. <block v-else>
  83. <text class="item-btn btn-solid" v-if="list.IsSignup !== 1" @click.stop="interest(list)">感兴趣</text>
  84. <text class="item-btn btn-solid" @click.stop="beNotInterested(list)" v-else>已预报名</text>
  85. </block>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 所有自定义弹框 -->
  90. <modalDialog
  91. :isShow="isShow"
  92. :signupType="signupType"
  93. :goFollow="goFollow"
  94. :hasPermission="hasPermission"
  95. :jurisdictionList="jurisdictionList"
  96. :editIsShow="editIsShow"
  97. :isCancelShow="isCancelShow"
  98. :idTypeCancel="idTypeCancel"
  99. :countryCode="countryCode"
  100. :mobileEdit="mobileEdit"
  101. :goOnNextStep="goOnNextStep"
  102. :isShowhasPermission="isShowhasPermission"
  103. :applyForIsShow="applyForIsShow"
  104. :mailboxBinding="mailboxBinding"
  105. />
  106. <u-modal
  107. v-model="specialGoFollowShow"
  108. :content-style="{ fontSize: '32rpx' }"
  109. :show-cancel-button="show_cancel_button"
  110. confirm-text="知道了"
  111. :show-confirm-button="show_confirm_button"
  112. :show-title="false"
  113. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  114. :confirm-style="{ fontWeight: '700' }"
  115. :mask-close-able="specialIsHintShow"
  116. @confirm="ininModalHandler"
  117. @cancel="ininModalHandler"
  118. >
  119. <view class="slot-content">
  120. <block v-if="specialPopupMsg">
  121. <text>{{ specialAccounts }}</text>
  122. <text class="light-hint">{{ specialPopupMsg }}</text>
  123. </block>
  124. <rich-text v-else :nodes="specialAccounts"></rich-text>
  125. </view>
  126. </u-modal>
  127. <SelectPopup :selectShow.sync="selectShow" @signupIsAddOfCancel="signupIsAddOfCancel" :selectYdong="selectYdong" />
  128. <ShowResearchDlg :isResearchModalShow.sync="isResearchModalShow" :jurisdictionList="jurisdictionList" :checkResearchList.sync="checkResearchList" />
  129. </view>
  130. </template>
  131. <script>
  132. import modalDialog from "../modalDialog.vue";
  133. import { activity, User } from "@/config/api.js";
  134. import SelectPopup from "@/components/activity/selectPopup";
  135. import ShowResearchDlg from "@/components/activity/showResearchDlg.vue";
  136. import { isTimeGreaterThanCurrent, isWithinOneHour } from "@/config/util.js";
  137. export default {
  138. name: "",
  139. components: { modalDialog, SelectPopup, ShowResearchDlg },
  140. props: {
  141. list: {
  142. type: Object,
  143. default: {},
  144. required: true,
  145. },
  146. componentsPage: {
  147. type: String,
  148. default: "",
  149. },
  150. },
  151. data() {
  152. return {
  153. /**/
  154. tabsActive: 0,
  155. /**/
  156. /* 共用的弹框 */
  157. isShow: false, //弹框
  158. signupType: "", //关注类型
  159. goFollow: false, //是否关注公众号
  160. hasPermission: "", //是否有权限
  161. jurisdictionList: {},
  162. editIsShow: false, //外呼莫泰框
  163. isCancelShow: false,
  164. idTypeCancel: {
  165. id: "",
  166. type: 1,
  167. cutId: "",
  168. state: "",
  169. isNum: false,
  170. },
  171. countryCode: "", //外呼区号
  172. mobileEdit: "", //外呼手机号
  173. goOnNextStep: "", //设置外呼号后弹出哪个
  174. isShowhasPermission: false, //拨打销售电话
  175. applyForIsShow: false, //潜在用户
  176. mailboxBinding: false, //是否绑定邮箱
  177. selectShow: false, //是否显示弹框
  178. selectYdong: false, // 参会方式展示的文案
  179. specialIsHintShow: false, // 按钮的显示
  180. specialGoFollowShow: false, // 弹框的隐藏显示
  181. specialAccounts: `您已开启【专项调研】新活动通知<br/><br/>请关注【查研观向小助手】公众号,及时获取微信消息提醒`,
  182. specialIsFollow: false, // 是否关注
  183. specialPopupMsg: "", // 消息的文案
  184. show_cancel_button: false, // 取消按钮的隐藏显示
  185. show_confirm_button: false, // 确定按钮的隐藏显示
  186. itemData: {},
  187. isResearchModalShow: false,
  188. checkResearchList: {},
  189. addItemData: {},
  190. };
  191. },
  192. computed: {},
  193. watch: {},
  194. created() {},
  195. mounted() {},
  196. methods: {
  197. isEndBtnSlide(item) {
  198. let isKey = ["IsShowOutboundCall", "IsShowAppointment", "IsShowMeetingReminder", "IsShowHelpSsk", "IsShowDetails", "IsShowSignup"];
  199. let arr = [];
  200. Object.keys(item).forEach((key) => {
  201. if (isKey.includes(key)) {
  202. item[key] && arr.push(item[key]);
  203. }
  204. });
  205. return arr.length;
  206. },
  207. // 我要报名
  208. wanttosignup(item) {
  209. this.activityIdAdd = item.ActivityId;
  210. this.itemData = item;
  211. if (item.YidongActivityId) {
  212. this.goDetail(item);
  213. return;
  214. } else if (
  215. (!item.IsResearchPoints && item.ActivityTypeId == 3 && !item.IsYidongConduct && item.IsLimitPeople == 1) ||
  216. (item.IsYidongConduct && item.IsCanOutboundCall) ||
  217. (!item.IsYidongConduct && item.IsLimitPeople == 1 && [1, 2].includes(item.ActivityTypeId))
  218. ) {
  219. this.selectShow = true;
  220. this.selectYdong = item.IsYidongConduct;
  221. } else {
  222. this.activityIdAdd = "";
  223. this.signupIsAddOfCancel(item, 3);
  224. }
  225. },
  226. //报名 取消报名 预约外呼/取消预约外呼报名
  227. signupIsAddOfCancel(item, type, valName = "") {
  228. let id = this.activityIdAdd || item.ActivityId;
  229. this.addItemData = item || this.itemData;
  230. if (item && item.IsSignup == 1) {
  231. if (item.IsResearchPoints) {
  232. if (isTimeGreaterThanCurrent(item.CancelDeadline)) {
  233. uni.showModal({
  234. confirmText: "知道了",
  235. showCancel: false,
  236. confirmColor: "#3385FF",
  237. content: "当前时间点已无法取消报名,若想取消,请联系对口销售",
  238. });
  239. return;
  240. }
  241. }
  242. if (isWithinOneHour(item.ActivityTime, 3600000)) {
  243. uni.showModal({
  244. confirmText: "知道了",
  245. showCancel: false,
  246. confirmColor: "#3385FF",
  247. content: type == 1 ? "活动开始前1小时内无法取消预约外呼,请联系对口销售处理" : "活动开始前1小时内无法取消报名,请联系对口销售处理",
  248. });
  249. return;
  250. }
  251. uni.showModal({
  252. content: type == 1 ? "您要取消此次活动预约外呼吗?" : "您要取消此次活动的报名吗?",
  253. confirmColor: "#3385FF",
  254. cancelColor: "#606266",
  255. success: async (res) => {
  256. if (res.confirm) {
  257. const res = await activity.signupCancel({
  258. ActivityId: item.ActivityId,
  259. SignupType: type,
  260. PageRouter: this.$store.state.pageRouterActivity,
  261. });
  262. if (res.Ret === 200) {
  263. this.parentDataEmit(this.addItemData, "IsSignup", 0);
  264. this.init();
  265. type == 1
  266. ? uni.showToast({
  267. title: "预约外呼已取消",
  268. duration: 2000,
  269. })
  270. : uni.showToast({
  271. title: "已取消报名",
  272. duration: 2000,
  273. });
  274. if (valName === "我的") {
  275. this.getActivityList();
  276. }
  277. }
  278. }
  279. },
  280. });
  281. } else {
  282. let timer = null;
  283. if (this.flag) return;
  284. clearTimeout(timer);
  285. this.flag = true;
  286. this.selectShow = false;
  287. if (this.addItemData.IsResearchPoints) {
  288. this.researchPointsHandler(id, type, this.addItemData);
  289. } else {
  290. this.myIsApplyHandler(id, type, valName);
  291. }
  292. timer = setTimeout(() => {
  293. this.flag = false;
  294. }, 500);
  295. }
  296. },
  297. // 弹框的初始化
  298. init() {
  299. this.signupType = "";
  300. this.goFollow = false;
  301. this.isShow = false;
  302. this.isCancelShow = false;
  303. },
  304. //添加消息提醒接口
  305. meetingReminderAdd(item, type) {
  306. if (type != 0) {
  307. this.meetingReminderCancel(item);
  308. return;
  309. }
  310. activity
  311. .meetingReminderAdd({
  312. ActivityId: item.ActivityId,
  313. PageRouter: this.$store.state.pageRouterActivity,
  314. })
  315. .then((res) => {
  316. if (res.Ret == 200) {
  317. this.hasPermission = res.Data.HasPermission;
  318. this.jurisdictionList = res.Data;
  319. if (this.hasPermission == 1) {
  320. if ((res.Data.GoFollow && res.Data.SignupStatus !== "Success") || !res.Data.GoFollow) this.isShow = true;
  321. else this.goFollow = res.Data.GoFollow;
  322. this.signupType = 999;
  323. this.idTypeCancel = {
  324. cutId: res.Data.ActivityId,
  325. state: 1,
  326. name: "conference",
  327. };
  328. this.parentDataEmit(item, "IsCancelMeetingReminder", 1);
  329. } else if (this.hasPermission == 2) {
  330. this.isShowhasPermission = true;
  331. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  332. this.applyForIsShow = true;
  333. }
  334. }
  335. });
  336. },
  337. //取消消息提醒接口
  338. meetingReminderCancel(item) {
  339. activity
  340. .meetingReminderCancel({
  341. ActivityId: item.ActivityId,
  342. PageRouter: this.$store.state.pageRouterActivity,
  343. })
  344. .then((res) => {
  345. if (res.Ret == 200) {
  346. uni.showModal({
  347. confirmText: "知道了",
  348. confirmColor: "#3385FF",
  349. content: res.Msg,
  350. showCancel: false,
  351. success: (res) => {
  352. if (this.isrefresh) return this.getActivityList();
  353. if (res.confirm) {
  354. this.parentDataEmit(item, "IsCancelMeetingReminder", 0);
  355. }
  356. },
  357. });
  358. }
  359. });
  360. },
  361. //帮我带问
  362. async askingGo(item, type = "") {
  363. const res = await activity.checkAskActivity({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  364. if (res.Ret == 200) {
  365. this.hasPermission = res.Data.HasPermission;
  366. this.jurisdictionList = res.Data;
  367. if (this.hasPermission == 1) {
  368. uni.navigateTo({
  369. url: "/activityPages/generationAsk/generationAsk?id=" + item.ActivityId + "&type=" + type,
  370. });
  371. } else if (this.hasPermission == 2) {
  372. this.isShowhasPermission = true;
  373. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  374. this.applyForIsShow = true;
  375. }
  376. }
  377. },
  378. // 弹框的初始化
  379. init() {
  380. this.signupType = "";
  381. this.goFollow = false;
  382. this.isShow = false;
  383. this.isCancelShow = false;
  384. },
  385. //预约纪要、取消预约纪要
  386. async summaryIsHandel(item, type = "") {
  387. if (item.IsAppointment == 0) {
  388. const res = await activity.postAppointmentAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  389. if (res.Ret == 200) {
  390. this.hasPermission = res.Data.HasPermission;
  391. this.jurisdictionList = res.Data;
  392. if (this.hasPermission == 1) {
  393. this.signupType = "summaryIsHandel";
  394. this.goOnNextStep = res.Data.GoFollow;
  395. if (res.Data.SignupStatus !== "Success") {
  396. this.isShow = true;
  397. } else {
  398. if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
  399. else if (res.Data.SignupStatus == "Success") this.isShow = true;
  400. this.parentDataEmit(item, "IsAppointment", 1);
  401. }
  402. } else if (this.hasPermission == 2) {
  403. this.isShowhasPermission = true;
  404. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  405. this.applyForIsShow = true;
  406. }
  407. }
  408. } else {
  409. uni.showModal({
  410. content: "确定要取消预约本场调研的纪要吗?",
  411. confirmColor: "#3385FF",
  412. cancelColor: "#606266",
  413. success: async (res) => {
  414. if (res.confirm) {
  415. const res = await activity.postAppointmentCancel({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  416. if (res.Ret === 200) {
  417. this.parentDataEmit(item, "IsAppointment", 0);
  418. this.init();
  419. if (type === "我的") {
  420. this.getActivityList();
  421. }
  422. }
  423. }
  424. },
  425. });
  426. }
  427. },
  428. //去往详情页面
  429. goDetail(item) {
  430. if (item.SourceType !== 1) {
  431. uni.navigateTo({ url: "/activityPages/specialDetail/specialDetail?id=" + item.ActivityId });
  432. } else {
  433. uni.navigateTo({ url: "/activityPages/activityDetail/activityDetail?id=" + item.ActivityId });
  434. }
  435. },
  436. // 查看行程的事件
  437. lookImg(item) {
  438. this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
  439. uni.previewImage({
  440. urls: [item.TripImgLink], //查看图片的数组
  441. });
  442. },
  443. // 点击感兴趣
  444. async interest(item) {
  445. const res = await activity.postSpecialSignupAdd({
  446. ActivityId: item.ActivityId,
  447. PageRouter: this.$store.state.pageRouterActivity,
  448. });
  449. if (res.Ret === 200) {
  450. this.modalShow(res);
  451. if (res.Data.SignupStatus == 1) {
  452. this.parentDataEmit(item, "IsSignup", 1);
  453. }
  454. }
  455. },
  456. // 报名或者取消报名
  457. async applyOfcancel(item, type = "") {
  458. this.show_confirm_button = true;
  459. if ((type != "back" && item.IsTrip == 1) || (type == "back" && item.IsSignup == 1)) {
  460. // 取消报名
  461. const str = item.ActivityTime.replace(/-/g, "/");
  462. const date = new Date(str);
  463. const times = date.getTime();
  464. const num = new Date().getTime();
  465. let twoDays = times - num <= 3600000 * 48;
  466. uni.showModal({
  467. content: twoDays ? "活动开始前48小时内,取消报名仍会维持扣点,确定要取消报名吗?" : "您要取消此次专项调研的预报名吗?",
  468. confirmColor: "#3385FF",
  469. cancelColor: "#606266",
  470. success: async (res) => {
  471. if (res.confirm) {
  472. const res = await activity.activityApecialCancel({
  473. ActivityId: item.ActivityId,
  474. PageRouter: this.$store.state.pageRouterActivity,
  475. });
  476. if (res.Ret === 200) {
  477. uni.showToast({
  478. title: "已取消",
  479. duration: 2000,
  480. });
  481. item.TripNum > 0 && (item.TripNum -= 1);
  482. type == "back" ? this.parentDataEmit(item, "IsSignup", 0) : this.parentDataEmit(item, "IsTrip", 0);
  483. }
  484. }
  485. },
  486. });
  487. } else {
  488. // 报名
  489. const res = await activity.activityApecialAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  490. if (res.Ret == 200) {
  491. this.modalShow(res);
  492. if (res.Data.SignupStatus == 1) {
  493. type == "back" ? this.parentDataEmit(item, "IsSignup", 1) : this.parentDataEmit(item, "IsTrip", 1);
  494. }
  495. }
  496. }
  497. },
  498. // 弹框的数据重置
  499. ininModalHandler() {
  500. this.show_cancel_button = false;
  501. this.show_confirm_button = false;
  502. this.specialIsHintShow = false;
  503. this.specialGoFollowShow = false;
  504. this.isCancelBtn = false;
  505. },
  506. // 显示弹框
  507. modalShow(res) {
  508. this.show_confirm_button = true;
  509. this.specialGoFollowShow = true;
  510. this.specialAccounts = res.Data.PopupMsg;
  511. this.specialPopupMsg = res.Data.PopupMsg2;
  512. },
  513. // 已预报名、就是不感兴趣
  514. beNotInterested(item) {
  515. uni.showModal({
  516. content: "您要取消此次专研调研的预报名吗?",
  517. confirmColor: "#3385FF",
  518. cancelColor: "#606266",
  519. success: async (res) => {
  520. if (res.confirm) {
  521. const res = await activity.postSpecialSignupAdd({
  522. ActivityId: item.ActivityId,
  523. PageRouter: this.$store.state.pageRouterActivity,
  524. });
  525. if (res.Ret === 200) {
  526. this.parentDataEmit(item, "IsSignup", 0);
  527. }
  528. }
  529. },
  530. });
  531. },
  532. // 新调研通知
  533. async specialFollow() {
  534. this.show_confirm_button = true;
  535. if (this.specialIsFollow) {
  536. uni.showModal({
  537. content: "您要取消【专项调研】新活动通知吗?",
  538. confirmColor: "#3385FF",
  539. cancelColor: "#606266",
  540. success: async (res) => {
  541. if (res.confirm) {
  542. const res = await activity.postSpecialFollow();
  543. if (res.Ret === 200) {
  544. this.specialIsFollow = !this.specialIsFollow;
  545. }
  546. }
  547. },
  548. });
  549. } else {
  550. const res = await activity.postSpecialFollow();
  551. if (res.Ret === 200) {
  552. this.show_cancel_button = true;
  553. this.specialIsFollow = !this.specialIsFollow;
  554. this.specialGoFollowShow = true;
  555. }
  556. }
  557. },
  558. parentDataEmit(item, value, num) {
  559. let index = this.$parent.newDataList.findIndex((key) => key.Activity && key.Activity.ActivityId === item.ActivityId);
  560. this.$parent.newDataList[index].Activity[value] = num;
  561. },
  562. richTextClamp(val) {
  563. return `<div style="${
  564. val == 7 ? "min-height: 50px;" : ""
  565. }line-clamp: ${val};-webkit-line-clamp: ${val};text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;word-wrap: break-word;word-break: break-all;">`;
  566. },
  567. // 我要报名的请求拆分出来了
  568. async myIsApplyHandler(id, type, valName = "") {
  569. const res = await activity.signupAdd({
  570. ActivityId: id,
  571. SignupType: type,
  572. PageRouter: this.$store.state.pageRouterActivity,
  573. });
  574. if (res.Ret == 200) {
  575. this.hasPermission = res.Data.HasPermission;
  576. this.jurisdictionList = res.Data;
  577. if (this.hasPermission == 1) {
  578. this.signupType = valName == "CClass" ? "CClass" : res.Data.SignupType;
  579. this.countryCode = res.Data.CountryCode;
  580. this.mobileEdit = res.Data.Mobile;
  581. this.goOnNextStep = res.Data.GoFollow;
  582. this.idTypeCancel = {
  583. cutId: res.Data.ActivityId,
  584. state: 1,
  585. };
  586. if (res.Data.GoBindEmail) {
  587. this.mailboxBinding = true;
  588. return;
  589. }
  590. if (res.Data.SignupStatus !== "Success") {
  591. this.isShow = true;
  592. } else {
  593. if (res.Data.GoOutboundMobile) this.editIsShow = true;
  594. else if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
  595. else if (res.Data.SignupStatus == "Success") this.isShow = true;
  596. this.parentDataEmit(this.addItemData, "IsSignup", 1);
  597. this.parentDataEmit(this.addItemData, "SignupType", type);
  598. }
  599. } else if (this.hasPermission == 2) {
  600. this.isShowhasPermission = true;
  601. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  602. this.applyForIsShow = true;
  603. }
  604. }
  605. },
  606. // 研选扣点的事件
  607. async researchPointsHandler(id, type, item) {
  608. const res = await activity.activityCheck({
  609. ActivityId: id,
  610. });
  611. if (res.Ret === 200) {
  612. let { Data } = res;
  613. this.checkResearchList = Data;
  614. this.checkResearchList.childrenType = type;
  615. this.jurisdictionList = item;
  616. this.isResearchModalShow = true;
  617. }
  618. },
  619. },
  620. };
  621. </script>
  622. <style scoped lang="scss">
  623. .container-activity-item {
  624. position: relative;
  625. width: 100%;
  626. background: #ffffff;
  627. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  628. border-radius: 8rpx;
  629. padding: 0 12rpx 12rpx;
  630. margin-bottom: 20rpx;
  631. font-size: 24rpx;
  632. overflow: hidden;
  633. .content-sign {
  634. margin-top: 12rpx;
  635. display: flex;
  636. align-items: center;
  637. justify-content: space-between;
  638. image {
  639. display: block;
  640. width: 122rpx;
  641. height: 42rpx;
  642. }
  643. .is-up-down {
  644. width: 110rpx;
  645. font-size: 24rpx;
  646. font-weight: 500;
  647. height: 40rpx;
  648. text-align: center;
  649. border-radius: 4rpx;
  650. color: #333333;
  651. }
  652. .is-up {
  653. background-color: #e5efff;
  654. }
  655. .is-down {
  656. background-color: #f2e8cc;
  657. }
  658. .is-end {
  659. color: #c0c0c0;
  660. background-color: #edf2f5;
  661. }
  662. .state {
  663. border-radius: 4rpx 0 4rpx 0;
  664. margin-left: 10rpx;
  665. }
  666. }
  667. .content-type {
  668. display: flex;
  669. justify-content: space-between;
  670. align-items: center;
  671. margin: 24rpx 0;
  672. }
  673. .content-title {
  674. font-size: 24rpx;
  675. font-weight: 400;
  676. color: #333333;
  677. line-height: 36rpx;
  678. }
  679. .content-text {
  680. font-size: 22rpx;
  681. font-weight: 400;
  682. color: #999999;
  683. line-height: 30rpx;
  684. margin: 10rpx 0;
  685. }
  686. .content-time {
  687. font-size: 22rpx;
  688. font-weight: 400;
  689. color: #999999;
  690. line-height: 30rpx;
  691. margin-bottom: 15rpx;
  692. }
  693. .content-city {
  694. display: flex;
  695. justify-content: flex-end;
  696. align-items: center;
  697. color: $uni-color-new;
  698. font-size: 26rpx;
  699. image {
  700. width: 32rpx;
  701. height: 32rpx;
  702. margin-right: 8rpx;
  703. }
  704. }
  705. .content-img {
  706. width: 186rpx;
  707. height: 48rpx;
  708. margin-left: -12rpx;
  709. }
  710. .content-btn {
  711. display: flex;
  712. overflow: hidden;
  713. overflow-x: auto;
  714. margin-top: 20rpx;
  715. justify-content: flex-end;
  716. .item-btn {
  717. display: flex;
  718. align-items: center;
  719. justify-content: center;
  720. padding: 0 12rpx;
  721. height: 42rpx;
  722. border-radius: 4rpx;
  723. color: $uni-color-new;
  724. border: 1rpx solid $uni-color-new;
  725. margin-left: 20rpx;
  726. flex-shrink: 0;
  727. margin-bottom: 2rpx;
  728. }
  729. .btn-solid {
  730. background: $uni-color-new;
  731. border: none;
  732. color: #fff;
  733. }
  734. }
  735. .content-btn-end {
  736. justify-content: flex-start;
  737. }
  738. .bottom-box {
  739. display: flex;
  740. }
  741. .text-Line {
  742. text-overflow: -o-ellipsis-lastline;
  743. overflow: hidden;
  744. text-overflow: ellipsis;
  745. display: -webkit-box;
  746. -webkit-box-orient: vertical;
  747. word-wrap: break-word;
  748. word-break: break-all;
  749. -webkit-line-clamp: 3;
  750. line-clamp: 3;
  751. }
  752. .select-box {
  753. width: 100%;
  754. view {
  755. height: 95prx;
  756. line-height: 95rpx;
  757. text-align: center;
  758. font-size: 32rpx;
  759. border-bottom: 1rpx solid #ebebeb;
  760. }
  761. }
  762. }
  763. </style>