activityItem.vue 28 KB

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