activityItem.vue 27 KB

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