activityItem.vue 28 KB

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