activityItem.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  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 style="width:83rpx;height:33rpx" v-if="list.IsResearchPoints" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Research_Points.png"></image>
  15. <image v-if="!list.IsResearchPoints && list.IsExternalLabel" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/activity_external.png"></image>
  16. {{ list.ActivityName || list.ResearchTheme }}
  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']">
  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, item);
  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. // 我要报名的请求拆分出来了
  551. async myIsApplyHandler(id, type, valName = "") {
  552. const res = await activity.signupAdd({
  553. ActivityId: id,
  554. SignupType: type,
  555. PageRouter: this.$store.state.pageRouterActivity,
  556. });
  557. if (res.Ret == 200) {
  558. this.hasPermission = res.Data.HasPermission;
  559. this.jurisdictionList = res.Data;
  560. if (this.hasPermission == 1) {
  561. this.signupType = valName == "CClass" ? "CClass" : res.Data.SignupType;
  562. this.countryCode = res.Data.CountryCode;
  563. this.mobileEdit = res.Data.Mobile;
  564. this.goOnNextStep = res.Data.GoFollow;
  565. this.idTypeCancel = {
  566. cutId: res.Data.ActivityId,
  567. state: 1,
  568. };
  569. if (res.Data.GoBindEmail) {
  570. this.mailboxBinding = true;
  571. return;
  572. }
  573. if (res.Data.SignupStatus !== "Success") {
  574. this.isShow = true;
  575. } else {
  576. if (res.Data.GoOutboundMobile) this.editIsShow = true;
  577. else if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
  578. else if (res.Data.SignupStatus == "Success") this.isShow = true;
  579. this.parentDataEmit(this.addItemData, "IsSignup", 1);
  580. this.parentDataEmit(this.addItemData, "SignupType", type);
  581. }
  582. } else if (this.hasPermission == 2) {
  583. this.isShowhasPermission = true;
  584. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  585. this.applyForIsShow = true;
  586. }
  587. }
  588. },
  589. // 研选扣点的事件
  590. async researchPointsHandler(id, type, item) {
  591. const res = await activity.activityCheck({
  592. ActivityId: id,
  593. });
  594. if (res.Ret === 200) {
  595. let { Data } = res;
  596. this.checkResearchList = Data;
  597. this.checkResearchList.childrenType = type;
  598. this.jurisdictionList = item;
  599. this.isResearchModalShow = true;
  600. }
  601. },
  602. },
  603. };
  604. </script>
  605. <style scoped lang="scss">
  606. .container-activity-item {
  607. position: relative;
  608. width: 100%;
  609. background: #ffffff;
  610. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  611. border-radius: 8rpx;
  612. padding: 20rpx;
  613. margin-bottom: 20rpx;
  614. font-size: 24rpx;
  615. overflow: hidden;
  616. .content-sign {
  617. display: flex;
  618. .is-up-down {
  619. width: 110rpx;
  620. height: 40rpx;
  621. text-align: center;
  622. line-height: 40rpx;
  623. border-radius: 4rpx;
  624. color: #fff;
  625. }
  626. .is-up {
  627. background: linear-gradient(90deg, #0151ff 0%, #01b9ff 100%);
  628. }
  629. .is-up-state {
  630. background: #ff9110;
  631. }
  632. .is-down-state {
  633. background-color: #01a7ff;
  634. }
  635. .is-down {
  636. background: linear-gradient(90deg, #ff8a05 0%, #ffb74d 100%);
  637. }
  638. .is-end {
  639. background: #dddddd;
  640. }
  641. .state {
  642. border-radius: 4rpx 0 4rpx 0;
  643. margin-left: 10rpx;
  644. }
  645. }
  646. .content-type {
  647. font-size: 32rpx;
  648. font-weight: 500;
  649. color: #333333;
  650. line-height: 38rpx;
  651. margin: 10rpx 0;
  652. }
  653. .content-title {
  654. font-size: 28rpx;
  655. font-weight: 400;
  656. color: #333333;
  657. line-height: 44rpx;
  658. image {
  659. width: 83rpx;
  660. height: 33rpx;
  661. vertical-align: middle;
  662. margin-right: 5rpx;
  663. }
  664. }
  665. .content-text {
  666. font-size: 28rpx;
  667. font-weight: 400;
  668. color: #999999;
  669. line-height: 44rpx;
  670. margin: 10rpx 0;
  671. }
  672. .content-time {
  673. color: #333333;
  674. margin-bottom: 15rpx;
  675. }
  676. .content-city {
  677. display: flex;
  678. justify-content: flex-end;
  679. align-items: center;
  680. color: #3385ff;
  681. image {
  682. width: 27rpx;
  683. height: 32rpx;
  684. margin-right: 8rpx;
  685. }
  686. }
  687. .content-img {
  688. position: absolute;
  689. top: 49rpx;
  690. right: 0;
  691. width: 205rpx;
  692. height: 119rpx;
  693. }
  694. .content-btn {
  695. display: flex;
  696. overflow: hidden;
  697. overflow-x: auto;
  698. margin-top: 20rpx;
  699. justify-content: flex-end;
  700. .item-btn {
  701. color: #3385ff;
  702. display: flex;
  703. align-items: center;
  704. justify-content: center;
  705. width: 113rpx;
  706. height: 42rpx;
  707. border-radius: 4rpx;
  708. border: 1rpx solid #3385ff;
  709. margin-left: 20rpx;
  710. flex-shrink: 0;
  711. }
  712. .btn-solid {
  713. background: #3385ff;
  714. border: none;
  715. color: #fff;
  716. }
  717. }
  718. .content-btn-end {
  719. justify-content: flex-start;
  720. }
  721. .bottom-box {
  722. display: flex;
  723. }
  724. .text-Line {
  725. text-overflow: -o-ellipsis-lastline;
  726. overflow: hidden;
  727. text-overflow: ellipsis;
  728. display: -webkit-box;
  729. -webkit-box-orient: vertical;
  730. word-wrap: break-word;
  731. word-break: break-all;
  732. -webkit-line-clamp: 3;
  733. line-clamp: 3;
  734. }
  735. .select-box {
  736. width: 100%;
  737. view {
  738. height: 95prx;
  739. line-height: 95rpx;
  740. text-align: center;
  741. font-size: 32rpx;
  742. border-bottom: 1rpx solid #ebebeb;
  743. }
  744. }
  745. .content-min-hight {
  746. min-height: 88rpx;
  747. text-overflow: -o-ellipsis-lastline;
  748. overflow: hidden;
  749. text-overflow: ellipsis;
  750. display: -webkit-box;
  751. -webkit-box-orient: vertical;
  752. word-wrap: break-word;
  753. word-break: break-all;
  754. -webkit-line-clamp: 2 !important;
  755. line-clamp: 2 !important;
  756. }
  757. }
  758. </style>