activityItem.vue 28 KB

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