activityItem.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  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. ) {
  217. this.selectShow = true;
  218. this.selectYdong = item.IsYidongConduct;
  219. } else {
  220. this.activityIdAdd = "";
  221. this.signupIsAddOfCancel(item, 3);
  222. }
  223. },
  224. //报名 取消报名 预约外呼/取消预约外呼报名
  225. signupIsAddOfCancel(item, type, valName = "") {
  226. let id = this.activityIdAdd || item.ActivityId;
  227. this.addItemData = item || this.itemData;
  228. if (item && item.IsSignup == 1) {
  229. if (item.IsResearchPoints) {
  230. if (isTimeGreaterThanCurrent(item.CancelDeadline)) {
  231. uni.showModal({
  232. confirmText: "知道了",
  233. showCancel: false,
  234. confirmColor: "#376cbb",
  235. content: "当前时间点已无法取消报名,若想取消,请联系对口销售",
  236. });
  237. return;
  238. }
  239. }
  240. if (isWithinOneHour(item.ActivityTime, 3600000)) {
  241. uni.showModal({
  242. confirmText: "知道了",
  243. showCancel: false,
  244. confirmColor: "#376cbb",
  245. content: type == 1 ? "活动开始前1小时内无法取消预约外呼,请联系对口销售处理" : "活动开始前1小时内无法取消报名,请联系对口销售处理",
  246. });
  247. return;
  248. }
  249. uni.showModal({
  250. content: type == 1 ? "您要取消此次活动预约外呼吗?" : "您要取消此次活动的报名吗?",
  251. confirmColor: "#376cbb",
  252. cancelColor: "#606266",
  253. success: async (res) => {
  254. if (res.confirm) {
  255. const res = await activity.signupCancel({
  256. ActivityId: item.ActivityId,
  257. SignupType: type,
  258. PageRouter: this.$store.state.pageRouterActivity,
  259. });
  260. if (res.Ret === 200) {
  261. this.parentDataEmit(this.addItemData, "IsSignup", 0);
  262. this.init();
  263. type == 1
  264. ? uni.showToast({
  265. title: "预约外呼已取消",
  266. duration: 2000,
  267. })
  268. : uni.showToast({
  269. title: "已取消报名",
  270. duration: 2000,
  271. });
  272. if (valName === "我的") {
  273. this.getActivityList();
  274. }
  275. }
  276. }
  277. },
  278. });
  279. } else {
  280. let timer = null;
  281. if (this.flag) return;
  282. clearTimeout(timer);
  283. this.flag = true;
  284. this.selectShow = false;
  285. if (this.addItemData.IsResearchPoints) {
  286. this.researchPointsHandler(id, type, this.addItemData);
  287. } else {
  288. this.myIsApplyHandler(id, type, valName);
  289. }
  290. timer = setTimeout(() => {
  291. this.flag = false;
  292. }, 500);
  293. }
  294. },
  295. // 弹框的初始化
  296. init() {
  297. this.signupType = "";
  298. this.goFollow = false;
  299. this.isShow = false;
  300. this.isCancelShow = false;
  301. },
  302. //添加消息提醒接口
  303. meetingReminderAdd(item, type) {
  304. if (type != 0) {
  305. this.meetingReminderCancel(item);
  306. return;
  307. }
  308. activity
  309. .meetingReminderAdd({
  310. ActivityId: item.ActivityId,
  311. PageRouter: this.$store.state.pageRouterActivity,
  312. })
  313. .then((res) => {
  314. if (res.Ret == 200) {
  315. this.hasPermission = res.Data.HasPermission;
  316. this.jurisdictionList = res.Data;
  317. if (this.hasPermission == 1) {
  318. if ((res.Data.GoFollow && res.Data.SignupStatus !== "Success") || !res.Data.GoFollow) this.isShow = true;
  319. else this.goFollow = res.Data.GoFollow;
  320. this.signupType = 999;
  321. this.idTypeCancel = {
  322. cutId: res.Data.ActivityId,
  323. state: 1,
  324. name: "conference",
  325. };
  326. res.Data.SignupStatus == "Success" && this.parentDataEmit(item, "IsCancelMeetingReminder", 1);
  327. } else if (this.hasPermission == 2) {
  328. this.isShowhasPermission = true;
  329. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  330. this.applyForIsShow = true;
  331. }
  332. }
  333. });
  334. },
  335. //取消消息提醒接口
  336. meetingReminderCancel(item) {
  337. activity
  338. .meetingReminderCancel({
  339. ActivityId: item.ActivityId,
  340. PageRouter: this.$store.state.pageRouterActivity,
  341. })
  342. .then((res) => {
  343. if (res.Ret == 200) {
  344. uni.showModal({
  345. confirmText: "知道了",
  346. confirmColor: "#376cbb",
  347. content: res.Msg,
  348. showCancel: false,
  349. success: (res) => {
  350. if (this.isrefresh) return this.getActivityList();
  351. if (res.confirm) {
  352. this.parentDataEmit(item, "IsCancelMeetingReminder", 0);
  353. }
  354. },
  355. });
  356. }
  357. });
  358. },
  359. //帮我带问
  360. async askingGo(item, type = "") {
  361. const res = await activity.checkAskActivity({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  362. if (res.Ret == 200) {
  363. this.hasPermission = res.Data.HasPermission;
  364. this.jurisdictionList = res.Data;
  365. if (this.hasPermission == 1) {
  366. if (res.Data.SignupStatus === "Success") {
  367. uni.navigateTo({
  368. url: "/activityPages/generationAsk/generationAsk?id=" + item.ActivityId + "&type=" + type,
  369. });
  370. } else {
  371. uni.showModal({
  372. confirmText: "知道了",
  373. confirmColor: "#376cbb",
  374. content: res.Msg || res.Data.PopupMsg,
  375. showCancel: false,
  376. success: (res) => {
  377. if (res.confirm) {
  378. this.getActivityDetail();
  379. }
  380. },
  381. });
  382. }
  383. } else if (this.hasPermission == 2) {
  384. this.isShowhasPermission = true;
  385. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  386. this.applyForIsShow = true;
  387. }
  388. }
  389. },
  390. // 弹框的初始化
  391. init() {
  392. this.signupType = "";
  393. this.goFollow = false;
  394. this.isShow = false;
  395. this.isCancelShow = false;
  396. },
  397. //预约纪要、取消预约纪要
  398. async summaryIsHandel(item, type = "") {
  399. if (item.IsAppointment == 0) {
  400. const res = await activity.postAppointmentAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  401. if (res.Ret == 200) {
  402. this.hasPermission = res.Data.HasPermission;
  403. this.jurisdictionList = res.Data;
  404. if (this.hasPermission == 1) {
  405. this.signupType = "summaryIsHandel";
  406. this.goOnNextStep = res.Data.GoFollow;
  407. if (res.Data.SignupStatus !== "Success") {
  408. this.isShow = true;
  409. } else {
  410. if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
  411. else if (res.Data.SignupStatus == "Success") this.isShow = true;
  412. this.parentDataEmit(item, "IsAppointment", 1);
  413. }
  414. } else if (this.hasPermission == 2) {
  415. this.isShowhasPermission = true;
  416. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  417. this.applyForIsShow = true;
  418. }
  419. }
  420. } else {
  421. uni.showModal({
  422. content: "确定要取消预约本场调研的纪要吗?",
  423. confirmColor: "#376cbb",
  424. cancelColor: "#606266",
  425. success: async (res) => {
  426. if (res.confirm) {
  427. const res = await activity.postAppointmentCancel({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  428. if (res.Ret === 200) {
  429. this.parentDataEmit(item, "IsAppointment", 0);
  430. this.init();
  431. if (type === "我的") {
  432. this.getActivityList();
  433. }
  434. }
  435. }
  436. },
  437. });
  438. }
  439. },
  440. //去往详情页面
  441. goDetail(item) {
  442. if (item.SourceType !== 1) {
  443. uni.navigateTo({ url: "/activityPages/specialDetail/specialDetail?id=" + item.ActivityId });
  444. } else {
  445. uni.navigateTo({ url: "/activityPages/activityDetail/activityDetail?id=" + item.ActivityId });
  446. }
  447. },
  448. // 查看行程的事件
  449. lookImg(item) {
  450. this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
  451. uni.previewImage({
  452. urls: [item.TripImgLink], //查看图片的数组
  453. });
  454. },
  455. // 点击感兴趣
  456. async interest(item) {
  457. const res = await activity.postSpecialSignupAdd({
  458. ActivityId: item.ActivityId,
  459. PageRouter: this.$store.state.pageRouterActivity,
  460. });
  461. if (res.Ret === 200) {
  462. this.modalShow(res);
  463. if (res.Data.SignupStatus == 1) {
  464. this.parentDataEmit(item, "IsSignup", 1);
  465. }
  466. }
  467. },
  468. // 报名或者取消报名
  469. async applyOfcancel(item, type = "") {
  470. this.show_confirm_button = true;
  471. if ((type != "back" && item.IsTrip == 1) || (type == "back" && item.IsSignup == 1)) {
  472. // 取消报名
  473. const str = item.ActivityTime.replace(/-/g, "/");
  474. const date = new Date(str);
  475. const times = date.getTime();
  476. const num = new Date().getTime();
  477. let twoDays = times - num <= 3600000 * 48;
  478. uni.showModal({
  479. content: twoDays ? "活动开始前48小时内,取消报名仍会维持扣点,确定要取消报名吗?" : "您要取消此次专项调研的预报名吗?",
  480. confirmColor: "#376cbb",
  481. cancelColor: "#606266",
  482. success: async (res) => {
  483. if (res.confirm) {
  484. const res = await activity.activityApecialCancel({
  485. ActivityId: item.ActivityId,
  486. PageRouter: this.$store.state.pageRouterActivity,
  487. });
  488. if (res.Ret === 200) {
  489. uni.showToast({
  490. title: "已取消",
  491. duration: 2000,
  492. });
  493. item.TripNum > 0 && (item.TripNum -= 1);
  494. type == "back" ? this.parentDataEmit(item, "IsSignup", 0) : this.parentDataEmit(item, "IsTrip", 0);
  495. }
  496. }
  497. },
  498. });
  499. } else {
  500. // 报名
  501. const res = await activity.activityApecialAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  502. if (res.Ret == 200) {
  503. this.modalShow(res);
  504. if (res.Data.SignupStatus == 1) {
  505. type == "back" ? this.parentDataEmit(item, "IsSignup", 1) : this.parentDataEmit(item, "IsTrip", 1);
  506. }
  507. }
  508. }
  509. },
  510. // 弹框的数据重置
  511. ininModalHandler() {
  512. this.show_cancel_button = false;
  513. this.show_confirm_button = false;
  514. this.specialIsHintShow = false;
  515. this.specialGoFollowShow = false;
  516. this.isCancelBtn = false;
  517. },
  518. // 显示弹框
  519. modalShow(res) {
  520. this.show_confirm_button = true;
  521. this.specialGoFollowShow = true;
  522. this.specialAccounts = res.Data.PopupMsg;
  523. this.specialPopupMsg = res.Data.PopupMsg2;
  524. },
  525. // 已预报名、就是不感兴趣
  526. beNotInterested(item) {
  527. uni.showModal({
  528. content: "您要取消此次专研调研的预报名吗?",
  529. confirmColor: "#376cbb",
  530. cancelColor: "#606266",
  531. success: async (res) => {
  532. if (res.confirm) {
  533. const res = await activity.postSpecialSignupAdd({
  534. ActivityId: item.ActivityId,
  535. PageRouter: this.$store.state.pageRouterActivity,
  536. });
  537. if (res.Ret === 200) {
  538. this.parentDataEmit(item, "IsSignup", 0);
  539. }
  540. }
  541. },
  542. });
  543. },
  544. // 新调研通知
  545. async specialFollow() {
  546. this.show_confirm_button = true;
  547. if (this.specialIsFollow) {
  548. uni.showModal({
  549. content: "您要取消【专项调研】新活动通知吗?",
  550. confirmColor: "#376cbb",
  551. cancelColor: "#606266",
  552. success: async (res) => {
  553. if (res.confirm) {
  554. const res = await activity.postSpecialFollow();
  555. if (res.Ret === 200) {
  556. this.specialIsFollow = !this.specialIsFollow;
  557. }
  558. }
  559. },
  560. });
  561. } else {
  562. const res = await activity.postSpecialFollow();
  563. if (res.Ret === 200) {
  564. this.show_cancel_button = true;
  565. this.specialIsFollow = !this.specialIsFollow;
  566. this.specialGoFollowShow = true;
  567. }
  568. }
  569. },
  570. parentDataEmit(item, value, num) {
  571. let index = this.$parent.newDataList.findIndex((key) => key.Activity && key.Activity.ActivityId === item.ActivityId);
  572. this.$parent.newDataList[index].Activity[value] = num;
  573. },
  574. richTextClamp(val) {
  575. return `<div style="${
  576. val == 7 ? "min-height: 50px;" : ""
  577. }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;">`;
  578. },
  579. // 我要报名的请求拆分出来了
  580. async myIsApplyHandler(id, type, valName = "") {
  581. const res = await activity.signupAdd({
  582. ActivityId: id,
  583. SignupType: type,
  584. PageRouter: this.$store.state.pageRouterActivity,
  585. });
  586. if (res.Ret == 200) {
  587. this.hasPermission = res.Data.HasPermission;
  588. this.jurisdictionList = res.Data;
  589. if (this.hasPermission == 1) {
  590. this.signupType = valName == "CClass" ? "CClass" : res.Data.SignupType;
  591. this.countryCode = res.Data.CountryCode;
  592. this.mobileEdit = res.Data.Mobile;
  593. this.goOnNextStep = res.Data.GoFollow;
  594. this.idTypeCancel = {
  595. cutId: res.Data.ActivityId,
  596. state: 1,
  597. };
  598. if (res.Data.GoBindEmail) {
  599. this.mailboxBinding = true;
  600. return;
  601. }
  602. if (res.Data.SignupStatus !== "Success") {
  603. this.isShow = true;
  604. } else {
  605. if (res.Data.GoOutboundMobile) this.editIsShow = true;
  606. else if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
  607. else if (res.Data.SignupStatus == "Success") this.isShow = true;
  608. this.parentDataEmit(this.addItemData, "IsSignup", 1);
  609. this.parentDataEmit(this.addItemData, "SignupType", type);
  610. }
  611. } else if (this.hasPermission == 2) {
  612. this.isShowhasPermission = true;
  613. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  614. this.applyForIsShow = true;
  615. }
  616. }
  617. },
  618. // 研选扣点的事件
  619. async researchPointsHandler(id, type, item) {
  620. const res = await activity.activityCheck({
  621. ActivityId: id,
  622. });
  623. if (res.Ret === 200) {
  624. let { Data } = res;
  625. this.checkResearchList = Data;
  626. this.checkResearchList.childrenType = type;
  627. this.jurisdictionList = item;
  628. this.isResearchModalShow = true;
  629. }
  630. },
  631. titleShowTxt(list) {
  632. let actTitle = list.ActivityTypeName || "专项产业调研";
  633. let researchTitle = list.Label;
  634. return list.ActivityTypeId == 3 && list.IsResearch ? researchTitle : actTitle;
  635. },
  636. },
  637. };
  638. </script>
  639. <style scoped lang="scss">
  640. .container-activity-item {
  641. position: relative;
  642. width: 100%;
  643. background: #ffffff;
  644. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  645. border-radius: 8rpx;
  646. padding: 0 12rpx 12rpx;
  647. margin-bottom: 20rpx;
  648. font-size: 24rpx;
  649. overflow: hidden;
  650. .content-sign {
  651. margin-top: 12rpx;
  652. display: flex;
  653. align-items: center;
  654. justify-content: space-between;
  655. image {
  656. display: block;
  657. width: 122rpx;
  658. height: 42rpx;
  659. }
  660. .is-up-down {
  661. width: 110rpx;
  662. font-size: 24rpx;
  663. font-weight: 500;
  664. height: 40rpx;
  665. text-align: center;
  666. border-radius: 4rpx;
  667. color: #333333;
  668. }
  669. .is-up {
  670. background-color: #e5efff;
  671. }
  672. .is-down {
  673. background-color: #f2e8cc;
  674. }
  675. .is-end {
  676. color: #c0c0c0;
  677. background-color: #edf2f5;
  678. }
  679. .state {
  680. border-radius: 4rpx 0 4rpx 0;
  681. margin-left: 10rpx;
  682. }
  683. }
  684. .content-type {
  685. display: flex;
  686. justify-content: space-between;
  687. align-items: center;
  688. margin: 24rpx 0;
  689. }
  690. .content-title {
  691. font-size: 24rpx;
  692. font-weight: 400;
  693. color: #333333;
  694. line-height: 36rpx;
  695. }
  696. .content-text {
  697. font-size: 22rpx;
  698. font-weight: 400;
  699. color: #999999;
  700. line-height: 30rpx;
  701. margin: 10rpx 0;
  702. }
  703. .content-time {
  704. font-size: 22rpx;
  705. font-weight: 400;
  706. color: #999999;
  707. line-height: 30rpx;
  708. margin-bottom: 15rpx;
  709. }
  710. .content-city {
  711. display: flex;
  712. justify-content: flex-end;
  713. align-items: center;
  714. color: $uni-color-new;
  715. font-size: 26rpx;
  716. image {
  717. width: 32rpx;
  718. height: 32rpx;
  719. margin-right: 8rpx;
  720. }
  721. }
  722. .content-img {
  723. width: 186rpx;
  724. height: 48rpx;
  725. margin-left: -12rpx;
  726. }
  727. .content-btn {
  728. display: flex;
  729. overflow: hidden;
  730. overflow-x: auto;
  731. margin-top: 20rpx;
  732. justify-content: flex-end;
  733. .item-btn {
  734. display: flex;
  735. align-items: center;
  736. justify-content: center;
  737. padding: 0 12rpx;
  738. height: 42rpx;
  739. border-radius: 4rpx;
  740. color: $uni-color-new;
  741. border: 1rpx solid $uni-color-new;
  742. margin-left: 20rpx;
  743. flex-shrink: 0;
  744. margin-bottom: 2rpx;
  745. }
  746. .btn-solid {
  747. background: $uni-color-new;
  748. border: none;
  749. color: #fff;
  750. }
  751. }
  752. .content-btn-end {
  753. justify-content: flex-start;
  754. }
  755. .bottom-box {
  756. display: flex;
  757. }
  758. .text-Line {
  759. text-overflow: -o-ellipsis-lastline;
  760. overflow: hidden;
  761. text-overflow: ellipsis;
  762. display: -webkit-box;
  763. -webkit-box-orient: vertical;
  764. word-wrap: break-word;
  765. word-break: break-all;
  766. -webkit-line-clamp: 3;
  767. line-clamp: 3;
  768. }
  769. .select-box {
  770. width: 100%;
  771. view {
  772. height: 95prx;
  773. line-height: 95rpx;
  774. text-align: center;
  775. font-size: 32rpx;
  776. border-bottom: 1rpx solid #ebebeb;
  777. }
  778. }
  779. }
  780. </style>