activityItem.vue 25 KB

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