activityItem.vue 25 KB

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