activity.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853
  1. <template>
  2. <view class="container activity-content">
  3. <!-- 活动、日程 -->
  4. <view class="top-content" id="idtop">
  5. <view class="tab">
  6. <view class="tab-item" v-for="(item, index) in tabs" :key="item.id">
  7. <view class="scroll-tab-item" :class="{ active: tabsActive == index }"
  8. @click="toggleTab(item, index)">
  9. {{ item.name }}
  10. <image src="@/static/img/border_act.png" class="border_act" v-if="tabsActive == index" mode="">
  11. </image>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <!-- 活动主题预告 -->
  17. <view class="dynamic-content" v-if="tabsActive == 0">
  18. <view class="target-title">
  19. <view class="foreshow box">
  20. <image src="../../static/img/foreshow_icon.png"></image>
  21. <text style="margin-left: 10rpx;">活动速览</text>
  22. </view>
  23. <view class="even-more box" @click="goSearch">
  24. <image src="../../static/img/search_iocn.png"></image>
  25. <text style="margin-left: 10rpx;">更多主题...</text>
  26. </view>
  27. </view>
  28. <view class="target-item">
  29. <view class="target-ul target-left">
  30. <view class="target-text" v-for="(item,index) in dynamicList" :key="index" v-if="index%2===0">
  31. <text :class="spanIndex.includes(index)?'active':''" @click="changeTarget(index)">
  32. {{item.KeyWord}}
  33. </text>
  34. </view>
  35. <view class="lucency">
  36. <image src="../../static/img/broadside-ico.png" mode=""></image>
  37. </view>
  38. </view>
  39. <view class="target-ul target-right">
  40. <view class="target-text" v-for="(item,index) in dynamicList" :key="index" v-if="index%2 !== 0">
  41. <text :class="spanIndex.includes(index)?'active':''" @click="changeTarget(index)">
  42. {{item.KeyWord}}
  43. </text>
  44. </view>
  45. <view class="lucency">
  46. <image src="../../static/img/broadside-ico.png" mode=""></image>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 状态的下拉选择 -->
  52. <view class="select-sticky" v-if="tabsActive == 0">
  53. <view class="select-conyent">
  54. <van-dropdown-menu active-color="#333333">
  55. <van-dropdown-item id="statusstate" @open="isscroll" :title="activeStateName" @close="closeTheWindow('statusstate')">
  56. <view class="menu-items">
  57. <view class="menu-items-box" @click="overallBtn('statusstate', key)"
  58. v-for="key in listActivityStaus" :key="key.Id">
  59. <view class="items-box">
  60. <u-icon v-if="key.IsChoose" name="checkbox-mark" color="#2C83FF" size="24"></u-icon>
  61. </view>
  62. <text>{{ key.StatusName }}</text>
  63. </view>
  64. </view>
  65. <view style="background-color: #f8f8fa;width: 100%;">
  66. <view style="margin: 0 auto;width: 682rpx;border-bottom: 2rpx solid #E5E5E5;">
  67. </view>
  68. </view>
  69. <view class="menu-items">
  70. <view class="menu-items-box" @click="timeListBtn('statusstate', key)"
  71. v-for="key in activityTimeList" :key="key.Id">
  72. <view class="items-box">
  73. <u-icon v-if="key.IsChoose" name="checkbox-mark" color="#2C83FF" size="24"></u-icon>
  74. </view>
  75. <text>{{ key.StatusName }}</text>
  76. </view>
  77. </view>
  78. <view class="replacement-box">
  79. <view class="replacement">
  80. <text @click="replacementBtn('statusstate')" class="replacement-box">重置</text>
  81. <text @click="replacementConfirm('statusstate')">确定</text>
  82. </view>
  83. </view>
  84. </van-dropdown-item>
  85. <van-dropdown-item id="industry" @open="isscroll" :title="chartPermissionName" @close="closeTheWindow('industry')">
  86. <view class="decide">
  87. <view class="items-box">
  88. <u-icon v-if="isShowJurisdiction" name="checkbox-mark" color="#2C83FF" size="24">
  89. </u-icon>
  90. </view>
  91. <text @click="isJurisdiction">始终只展示有权限的行业</text>
  92. </view>
  93. <view style="background-color: #f8f8fa;width: 100%;">
  94. <view style="margin: 0 auto;width: 682rpx;border-bottom: 2rpx solid #E5E5E5;">
  95. </view>
  96. </view>
  97. <view class="menu-items">
  98. <view class="menu-items-box" v-for="item in listChartPermission"
  99. :key="item.ChartPermissionId" @click="overallClick('industry', item)">
  100. <view class="items-box">
  101. <u-icon v-if="item.IsChoose" name="checkbox-mark"
  102. :color="isShowJurisdiction ? '#ccc' : '#2C83FF'" size="24"></u-icon>
  103. </view>
  104. <text>{{ item.PermissionName }}</text>
  105. </view>
  106. </view>
  107. <view class="replacement">
  108. <text @click="replacementBtn('industry')" class="replacement-box">重置</text>
  109. <text @click="replacementConfirm('industry')">确定</text>
  110. </view>
  111. </van-dropdown-item>
  112. <van-dropdown-item id="genre" @open="isscroll" :title="activityTypeName" @close="closeTheWindow('genre')">
  113. <view class="menu-items">
  114. <view class="menu-items-box" @click="overallActivity('genre', item)"
  115. v-for="(item, index) in listActivityType" :key="item.ActivityTypeId">
  116. <view class="items-box">
  117. <u-icon v-if="item.IsChoose" name="checkbox-mark" color="#2C83FF" size="24">
  118. </u-icon>
  119. </view>
  120. <text>{{ item.ActivityTypeName }}</text>
  121. </view>
  122. </view>
  123. <view class="replacement">
  124. <text @click="replacementBtn('genre')" class="replacement-box">重置</text>
  125. <text @click="replacementConfirm('genre')">确定</text>
  126. </view>
  127. </van-dropdown-item>
  128. </van-dropdown-menu>
  129. </view>
  130. </view>
  131. <!-- 活动的列表 -->
  132. <view class="box-content" id="contentList" :class="{ head: tabsActive == 1 }" v-if="haveData">
  133. <view class="content-list" v-for="(item, index) in collectList" :key="index">
  134. <view class="list-top">
  135. <view class="list-top-box">
  136. <text class="title">{{ item.ActivityTypeName }}</text>
  137. <view class="city" v-if="item.City">
  138. <image src="../../static/img/location.png" mode=""></image>
  139. <text>{{ item.City }}</text>
  140. </view>
  141. <view class="choose-limit" @click="strictSelection" v-if="item.IsShowSustainable">
  142. <image src="../../static/img/choose_icon.png" mode=""></image>
  143. <image class="limit-img" src="../../static/img/limit_icon.png" mode=""></image>
  144. </view>
  145. </view>
  146. <text style="color: #2acdd9; font-size: 26rpx" v-if="item.ActiveState == 1">未开始</text>
  147. <text style="color: #ff4040; font-size: 26rpx" v-if="item.ActiveState == 2">进行中</text>
  148. <text style="color: #999999; font-size: 26rpx" v-if="item.ActiveState == 3">已结束</text>
  149. </view>
  150. <view class="" style="display: flex">
  151. <view class="list-center" @click="goDetail(item)">
  152. <text class="title" v-if="item.IsBrackets == 1">{{
  153. item.ActivityName
  154. }}</text>
  155. <text class="title-two" v-else>{{ item.ActivityName }}</text>
  156. <view class="setting-center">
  157. <view class="">
  158. <view class="box-expert" style="padding-bottom: 30rpx" v-if="
  159. item.ActivityTypeName == '专家电话会' ||
  160. item.ActivityTypeName == '专家线下沙龙'
  161. ">
  162. <view style="width: 140rpx"> 专家背景: </view>
  163. <view style="width: 400rpx">
  164. <rich-text :nodes="item.Expert"></rich-text>
  165. </view>
  166. </view>
  167. <text style="padding-bottom: 30rpx" v-if="
  168. item.ActivityTypeName == '公司调研电话会' ||
  169. item.ActivityTypeName == '公司线下调研'
  170. ">嘉宾:{{ item.DistinguishedGuest }}</text>
  171. <text style="padding-bottom: 30rpx" v-if="
  172. item.ActivityTypeName == '分析师电话会' ||
  173. item.ActivityTypeName == '分析师线下沙龙'
  174. ">主讲人:{{ item.Speaker }}</text>
  175. </view>
  176. </view>
  177. <text style="padding-bottom: 30rpx">活动时间:{{ item.ActivityTimeText }}</text>
  178. </view>
  179. <view class="" style="display: flex; align-items: center; padding-right: 30rpx">
  180. <u-icon style="padding-bottom: 30rpx" name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  181. </view>
  182. </view>
  183. <view class="list-bottom" v-if="
  184. item.ActiveState == 1 &&
  185. item.IsLimitPeople == 1 &&
  186. item.ActivityTypeName == '公司调研电话会'
  187. ">
  188. <view class="multi-text">
  189. <text v-if="item.IsSignup !== 1"
  190. @click="wanttosignup(item.ActivityId)">我要报名({{ item.SignupNum }}/{{ item.LimitPeopleNum }})</text>
  191. <text v-else
  192. @click="signupCancel(item.ActivityId, 2, item.ActivityTime)">{{ item.SignupType == 1 ? "取消外呼" : "取消报名" }}({{
  193. item.SignupNum
  194. }}/{{ item.LimitPeopleNum }})</text>
  195. </view>
  196. </view>
  197. <view class="list-bottom" v-else-if="item.ActiveState == 1">
  198. <view class="multi" v-if="item.ActivityTypeId == 1 || item.ActivityTypeId == 2 || (item.ActivityTypeId == 3 && item.IsLimitPeople == 0)">
  199. <text class="multi-outbound" v-if="item.IsSignup !== 1"
  200. @click="signupAdd(item.ActivityId, 1)">预约外呼</text>
  201. <text class="multi-outbound" v-else
  202. @click="signupCancel(item.ActivityId, 1, item.ActivityTime)">取消外呼</text>
  203. <text class="multi-remind" v-if="item.IsCancelMeetingReminder == 0"
  204. style="border-left: 1px solid #e5e5e5"
  205. @click="meetingReminderAdd(item.ActivityId)">会议提醒</text>
  206. <text class="multi-remind" v-else style="border-left: 1px solid #e5e5e5"
  207. @click="meetingReminderCancel(item.ActivityId)">取消会议提醒</text>
  208. </view>
  209. <view class="multi-text" v-else>
  210. <text v-if="item.IsSignup !== 1"
  211. @click="signupAdd(item.ActivityId, 3)">我要报名({{ item.SignupNum }}/{{ item.LimitPeopleNum }})</text>
  212. <text v-else
  213. @click="signupCancel(item.ActivityId, 3, item.ActivityTime)">取消报名({{ item.SignupNum }}/{{ item.LimitPeopleNum }})</text>
  214. </view>
  215. </view>
  216. </view>
  217. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20"
  218. v-if="totalPage > 1" />
  219. </view>
  220. <!-- 缺审显示 -->
  221. <view class="nodata" :class="tabsActive == 0?'':'nodataTwo'" v-else>
  222. <image src="@/static/img/act_search.png" mode="" class="nodata_ico"></image>
  223. <text>{{tabsActive==1?'暂无日程':"暂无活动"}}</text>
  224. </view>
  225. <!-- 所有自定义弹框 -->
  226. <modalDialog :isShow="isShow" :signupType="signupType" :goFollow="goFollow" :signupStatus="signupStatus"
  227. :hasPermission="hasPermission" :jurisdictionList="jurisdictionList" :editIsShow="editIsShow"
  228. :isCancelShow="isCancelShow" :idTypeCancel="idTypeCancel" @cancelShowBtn="cancelEnsure"
  229. :countryCode="countryCode" :mobileEdit="mobileEdit" :goOnNextStep="goOnNextStep"
  230. :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow"
  231. :mailboxBinding="mailboxBinding"/>
  232. <!-- 区号的选择 -->
  233. <areaCode :isAreaCode="isAreaCode" :areaCode="areaCode" />
  234. <!-- 限制报名的参会方式 -->
  235. <view class="select-box">
  236. <u-popup v-model="selectShow" mode="bottom">
  237. <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
  238. <view style="color: #2c83ff" @click="signupAdd('id', 1)">预约外呼</view>
  239. <view style="color: #2c83ff" @click="signupAdd('id', 2)">自主拨入</view>
  240. <view style="color: #a9afb8" @click="selectShow = false">取消</view>
  241. </u-popup>
  242. </view>
  243. </view>
  244. </template>
  245. <script>
  246. import { activity, User } from "@/config/api.js";
  247. import { Throttle } from "@/config/util.js";
  248. import modalDialog from "@/components/modalDialog.vue";
  249. import areaCode from "@/components/areaCode.vue";
  250. import myMixin from "@/activityPages/index.js";
  251. let app = getApp();
  252. export default {
  253. data() {
  254. return {
  255. tabs: [{
  256. name: "全部活动",
  257. id: 1,
  258. }, {
  259. name: "我的日程",
  260. id: 2,
  261. }],
  262. tabsActive: 0,
  263. totalPage: "",
  264. haveData: true,
  265. spanIndex: [],
  266. activeStateName: "未开始",
  267. activeState: "1", //活动进行状态
  268. dynamicList: [],
  269. isScrollShow:false
  270. };
  271. },
  272. mixins: [myMixin],
  273. components: {
  274. modalDialog,
  275. areaCode,
  276. },
  277. computed:{
  278. messageTitle(){
  279. if(this.activeStateName=='未开始'&&this.chartPermissionName=='所有行业'&&this.activityTypeName=="所有类型") {
  280. return '近期所有行业活动预告'
  281. }else {
  282. return this.activeStateName+','+this.chartPermissionName+','+this.activityTypeName
  283. }
  284. }
  285. },
  286. methods: {
  287. //页面滑动了
  288. isscroll(){
  289. this.isScrollShow=true
  290. },
  291. // 通过分享进来的下拉选择的状态
  292. shareOption() {
  293. const arr = this.activeState.split(',').map(item => item - 0)
  294. this.listActivityStaus.forEach(item => {
  295. if (arr.indexOf(item.Id) !== -1) {
  296. item.IsChoose = true
  297. } else {
  298. item.IsChoose = false
  299. }
  300. })
  301. const arrTwo = this.activityTimeStatus.split(',').map(item => item - 0)
  302. this.activityTimeList.forEach(item => {
  303. if (arrTwo.indexOf(item.Id) !== -1) {
  304. item.IsChoose = true
  305. } else {
  306. item.IsChoose = false
  307. }
  308. })
  309. const hyarr = this.chartPermissionIds.split(',').map(item => item - 0)
  310. this.listChartPermission.forEach(key => {
  311. if (hyarr.indexOf(key.ChartPermissionId) !== -1) {
  312. key.IsChoose = true
  313. } else {
  314. key.IsChoose = false
  315. }
  316. })
  317. const lxarr = this.activityTypeIds.split(',').map(item => item - 0)
  318. this.listActivityType.forEach(key => {
  319. if (lxarr.indexOf(key.ActivityTypeId) !== -1) {
  320. key.IsChoose = true
  321. } else {
  322. key.IsChoose = false
  323. }
  324. })
  325. this.preserve()
  326. },
  327. //获取列表
  328. getList() {
  329. activity
  330. .getActivityList({
  331. PageSize: this.pageSize,
  332. CurrentIndex: this.page_no,
  333. ActiveState: this.activeState, //活动进行状态
  334. ActivityTypeIds: this.activityTypeIds, //活动类型id 多个用 , 隔开
  335. ChartPermissionIds: this.chartPermissionIds, //行业id 多个用 , 隔开
  336. IsShowJurisdiction: this.isId,
  337. Label: this.keyWord,
  338. WhichDay: this.activityTimeStatus
  339. })
  340. .then((res) => {
  341. if (res.Ret !== 200) return;
  342. this.status =
  343. this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  344. this.totalPage = res.Data.Paging.Pages; //总页数
  345. if (this.page_no === 1) {
  346. this.collectList = res.Data.List || [];
  347. this.haveData = this.collectList.length ? true : false;
  348. if (this.refresh) {
  349. uni.stopPullDownRefresh();
  350. this.refresh = false;
  351. }
  352. } else {
  353. this.collectList.push(...res.Data.List);
  354. }
  355. });
  356. },
  357. //我的日程
  358. getScheduleList() {
  359. activity
  360. .getScheduleList({
  361. PageSize: this.pageSize,
  362. CurrentIndex: this.page_no,
  363. })
  364. .then((res) => {
  365. if (res.Ret !== 200) return;
  366. this.status =
  367. this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  368. this.totalPage = res.Data.Paging.Pages || ''; //总页数
  369. if (this.page_no === 1) {
  370. this.collectList = res.Data.List || [];
  371. this.haveData = this.collectList.length ? true : false;
  372. if (this.refresh) {
  373. uni.stopPullDownRefresh();
  374. this.refresh = false;
  375. }
  376. } else {
  377. this.collectList.push(...res.Data.List);
  378. }
  379. });
  380. },
  381. //获取活动详情接口
  382. getUserSearchContent(name) {
  383. activity
  384. .getUserSearchContent({
  385. IsShowJurisdiction: this.isId,
  386. })
  387. .then((res) => {
  388. this.isShowJurisdiction = res.Data.IsShowJurisdiction;
  389. this.listActivityStaus = res.Data.ListActivityStaus;
  390. this.listActivityType = res.Data.ListActivityType;
  391. this.listChartPermission = res.Data.ListChartPermission || [];
  392. this.listChartPermissionInit = res.Data.ListChartPermission2
  393. if (name == "traverse") {
  394. const hyArr = [];
  395. this.listChartPermission.forEach((key) => {
  396. if (key.IsChoose) {
  397. hyArr.push(key.ChartPermissionId);
  398. }
  399. });
  400. this.chartPermissionIds = hyArr.join(",");
  401. }
  402. if (this.isGain) {
  403. // this.preserve()
  404. } else {
  405. this.shareOption()
  406. }
  407. });
  408. },
  409. //头部tabs切换
  410. toggleTab(item, index) {
  411. if (this.tabsActive !== index) {
  412. this.tabsActive = index;
  413. }
  414. this.$store.dispatch('checkHandle').then(res => {
  415. app.globalData.isAuth = res.IsAuth;
  416. app.globalData.isBind = res.IsBind;
  417. if ((!res.IsAuth) && (!res.IsBind)) { //已授权已绑定
  418. this.page_no = 1;
  419. this.collectList = [];
  420. this.status = "loadmore";
  421. if (this.tabsActive == 0) {
  422. this.getList();
  423. } else {
  424. this.getScheduleList();
  425. }
  426. } else if (res.IsAuth) { //未授权
  427. this.tabsActive = 0
  428. uni.navigateTo({
  429. url: '/pages/authGuide/authGuide'
  430. })
  431. } else if (res.IsBind && !res.IsAuth) { //已授权未绑定
  432. this.tabsActive = 0
  433. uni.navigateTo({
  434. url: '/pages/login/login'
  435. })
  436. }
  437. })
  438. },
  439. //取消弹框的确认事件
  440. cancelEnsure(obj, type, unm) {
  441. this.init()
  442. if (obj.name == "conference") return;
  443. if (this.tabsActive == 0) {
  444. if (obj.cutId == 0) return;
  445. if (type == 1) {
  446. this.collectList.forEach((item) => {
  447. if (obj.cutId == item.ActivityId) {
  448. item.IsSignup = obj.state;
  449. if (unm) {
  450. item.SignupNum = item.SignupNum - 1;
  451. } else {
  452. item.SignupNum = item.SignupNum + 1;
  453. }
  454. }
  455. });
  456. } else {
  457. this.collectList.forEach((item) => {
  458. if (obj.cutId == item.ActivityId) {
  459. item.IsSignup = obj.state;
  460. if (unm) {
  461. item.SignupNum = item.SignupNum - 1;
  462. } else {
  463. item.SignupNum = item.SignupNum + 1;
  464. }
  465. }
  466. });
  467. }
  468. } else {
  469. this.getScheduleList();
  470. }
  471. },
  472. //去往搜索事件
  473. goSearch() {
  474. this.public({type:'show'}, true, "/activityPages/activitySearch/activitySearch")
  475. },
  476. //添加会议提醒接口
  477. meetingReminderAdd(id) {
  478. this.$store.dispatch("checkHandle").then((res) => {
  479. app.globalData.isAuth = res.IsAuth;
  480. app.globalData.isBind = res.IsBind;
  481. })
  482. if (app.globalData.isBind && !app.globalData.isAuth) {
  483. uni.navigateTo({
  484. url: "/pages/login/login",
  485. });
  486. return;
  487. } else if (app.globalData.isAuth) {
  488. uni.navigateTo({
  489. url: '/pages/authGuide/authGuide'
  490. })
  491. return
  492. }
  493. activity
  494. .meetingReminderAdd({
  495. ActivityId: id,
  496. })
  497. .then((res) => {
  498. if (res.Ret == 200) {
  499. this.hasPermission = res.Data.HasPermission;
  500. if (this.hasPermission == 1) {
  501. if (
  502. (res.Data.GoFollow && res.Data.SignupStatus !== "Success") ||
  503. !res.Data.GoFollow
  504. ) {
  505. this.isShow = true;
  506. } else {
  507. this.goFollow = res.Data.GoFollow;
  508. }
  509. this.signupType = 999;
  510. this.signupStatus = res.Data.SignupStatus;
  511. this.idTypeCancel = {
  512. cutId: res.Data.ActivityId,
  513. state: 1,
  514. name: "conference",
  515. };
  516. this.collectList.forEach((item) => {
  517. if (id == item.ActivityId) {
  518. item.IsCancelMeetingReminder = 1;
  519. }
  520. });
  521. } else if (this.hasPermission == 2) {
  522. this.jurisdictionList.SellerMobile = res.Data.SellerMobile;
  523. this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
  524. this.isShowhasPermission = true;
  525. } else if (this.hasPermission == 3 || this.hasPermission == 4) {
  526. this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
  527. this.applyForIsShow = true;
  528. }
  529. }
  530. });
  531. },
  532. //取消会议提醒接口
  533. meetingReminderCancel(id) {
  534. activity
  535. .meetingReminderCancel({
  536. ActivityId: id,
  537. })
  538. .then((res) => {
  539. if (res.Ret == 200) {
  540. uni.showModal({
  541. confirmText: "知道了",
  542. confirmColor: "#3385FF",
  543. content: res.Msg,
  544. showCancel: false,
  545. success: (res) => {
  546. if (res.confirm) {
  547. this.collectList.forEach((item) => {
  548. if (id == item.ActivityId) {
  549. item.IsCancelMeetingReminder = 0;
  550. }
  551. });
  552. }
  553. if (this.tabsActive !== 0) {
  554. this.status = "loading";
  555. this.page_no = 1;
  556. this.getScheduleList();
  557. }
  558. },
  559. });
  560. }
  561. });
  562. },
  563. //遍历
  564. preserve() {
  565. const arr = []
  566. const str = []
  567. this.listActivityStaus.forEach(item => {
  568. if (item.IsChoose) {
  569. arr.push(item.Id)
  570. str.push(item.StatusName)
  571. }
  572. })
  573. this.activeState = arr.join(',')
  574. const arrTwo = []
  575. const strTwo=[]
  576. this.activityTimeList.forEach(key => {
  577. if (key.IsChoose) {
  578. arrTwo.push(key.Id)
  579. strTwo.push(key.StatusName)
  580. }
  581. })
  582. if (strTwo.length > 0) {
  583. this.activeStateName = strTwo.join(',')
  584. }else{
  585. if (str.length == this.listActivityStaus.length) {
  586. this.activeStateName = '所有状态'
  587. } else {
  588. this.activeStateName = str.join(',')
  589. }
  590. }
  591. this.activityTimeStatus = arrTwo.join(',')
  592. const hyArr = []
  593. const hyStr = []
  594. this.listChartPermission.forEach(key => {
  595. if (key.IsChoose) {
  596. hyArr.push(key.ChartPermissionId)
  597. hyStr.push(key.PermissionName)
  598. }
  599. })
  600. if ((hyStr.length == 6 && this.listChartPermission.length == 6) || hyStr.length <= 0) {
  601. this.chartPermissionName = '所有行业'
  602. } else {
  603. this.chartPermissionName = hyStr.join(',')
  604. }
  605. this.chartPermissionIds = hyArr.join(',')
  606. const lxArr = []
  607. const lxStr = []
  608. this.listActivityType.forEach(key => {
  609. if (key.IsChoose) {
  610. lxArr.push(key.ActivityTypeId)
  611. lxStr.push(key.ActivityTypeName)
  612. }
  613. })
  614. if (lxStr.length == this.listActivityType.length && lxStr.length > 0 || lxStr.length <= 0) {
  615. this.activityTypeName = '所有类型'
  616. } else {
  617. this.activityTypeName = lxStr.join(',')
  618. }
  619. this.activityTypeIds = lxArr.join(',')
  620. this.getList()
  621. },
  622. //选择预告气泡的标签
  623. changeTarget(index, item) {
  624. let arrIndex = this.spanIndex.indexOf(index);
  625. if (arrIndex > -1) {
  626. this.spanIndex.splice(arrIndex, 1);
  627. } else {
  628. this.spanIndex.push(index);
  629. }
  630. const arr = []
  631. this.spanIndex.forEach(item=>{
  632. if(this.dynamicList.length>0){
  633. arr.push(this.dynamicList[item].KeyWord)
  634. }
  635. })
  636. this.keyWord = arr.join(',')
  637. this.page_no = 1
  638. this.getList()
  639. },
  640. //获取快捷主题
  641. fastSearchKeWord() {
  642. activity.fastSearchKeWord({
  643. ActiveState: this.activeState,
  644. ActivityTypeIds: this.activityTypeIds,
  645. ChartPermissionIds: this.chartPermissionIds,
  646. WhichDay: this.activityTimeStatus
  647. }).then(res => {
  648. if (res.Ret !== 200) return
  649. this.dynamicList = res.Data.List || []
  650. })
  651. },
  652. },
  653. //load
  654. onLoad(option) {
  655. this.$store.dispatch("checkHandle", {type:'load',val:option}).then(res => {
  656. app.globalData.isAuth = res.IsAuth;
  657. app.globalData.isBind = res.IsBind;
  658. if(option){
  659. if (Object.keys(option).length !== 0) {
  660. this.activeState = option.statesId; //活动进行状态
  661. this.activityTypeIds = option.typeIds; //活动类型id 多个用 , 隔开
  662. this.chartPermissionIds = option.chartIds; //行业id 多个用 , 隔开
  663. this.activeStateName = option.stateName;
  664. this.chartPermissionName = option.chartName;
  665. this.activityTypeName = option.typeName;
  666. this.activityTimeStatus = option.timeStatus;
  667. this.spanIndex = option.indexs ? option.indexs.split(',').map(item => item - 0) : []
  668. this.keyWord = option.keys
  669. this.isGain = false;
  670. }
  671. }else {
  672. this.isGain = true;
  673. }
  674. if (this.isGain) {
  675. this.getList();
  676. }
  677. this.getUserSearchContent();
  678. this.fastSearchKeWord()
  679. })
  680. },
  681. //切换tabs 刷新页面
  682. onTabItemTap() {
  683. if (this.page_no > 1 || this.tabsActive !== 0 || this.collectList !== []) {
  684. this.tabsActive = 0;
  685. this.activeStateName = "未开始";
  686. this.chartPermissionName = "所有行业";
  687. this.activityTypeName = "所有类型";
  688. this.activeState = "1"; //活动进行状态
  689. this.activityTypeIds = ""; //活动类型id 多个用 , 隔开
  690. this.chartPermissionIds = ""; //行业id 多个用 , 隔开
  691. this.page_no = 1;
  692. this.collectList = [];
  693. this.spanIndex=[]
  694. this.keyWord= ''
  695. this.activityTimeList.forEach(key => {key.IsChoose=false})
  696. this.activityTimeStatus=''
  697. this.getList();
  698. this.getUserSearchContent();
  699. }
  700. },
  701. //show
  702. onShow() {
  703. this.countryCcode(); //判断是否加区号
  704. this.$store.dispatch("statistics",{PageType:'Activit'})
  705. },
  706. //页面隐藏
  707. onHide() {
  708. if (this.tabsActive !== 0 ) return
  709. this.selectComponent("#statusstate").toggle(false);
  710. this.selectComponent("#industry").toggle(false);
  711. this.selectComponent("#genre").toggle(false);
  712. },
  713. /** 用户点击分享 */
  714. onShareAppMessage: function(res) {
  715. return {
  716. title: this.keyWord? this.keyWord:this.messageTitle,
  717. path: "/pages/activity/activity?statesId=" +
  718. this.activeState +
  719. "&typeIds=" +
  720. this.activityTypeIds +
  721. "&chartIds=" +
  722. this.chartPermissionIds +
  723. "&stateName=" +
  724. this.activeStateName +
  725. "&chartName=" +
  726. this.chartPermissionName +
  727. "&typeName=" +
  728. this.activityTypeName +
  729. "&tabs=" +
  730. this.tabsActive +
  731. "&timeStatus=" +
  732. this.activityTimeStatus +
  733. "&indexs=" + this.spanIndex +
  734. "&keys=" + this.keyWord,
  735. success: (res) => {},
  736. fail: (err) => {},
  737. };
  738. },
  739. /* 触底 */
  740. onReachBottom: Throttle(function() {
  741. if (this.status === "nomore") return;
  742. this.status = "loading";
  743. this.page_no++;
  744. if (this.tabsActive == 0) {
  745. this.getList();
  746. } else {
  747. this.getScheduleList();
  748. }
  749. }),
  750. /* 下拉刷新 */
  751. onPullDownRefresh: Throttle(function() {
  752. this.page_no = 1;
  753. this.refresh = true;
  754. if (this.tabsActive == 0) {
  755. this.getList();
  756. } else {
  757. this.getScheduleList();
  758. }
  759. }),
  760. // 页面滚动事件
  761. onPageScroll() {
  762. if (this.tabsActive !== 0 || !this.isScrollShow) return
  763. this.selectComponent("#statusstate").toggle(false);
  764. this.selectComponent("#industry").toggle(false);
  765. this.selectComponent("#genre").toggle(false);
  766. this.isScrollShow=false
  767. },
  768. };
  769. </script>
  770. <style scoped lang="scss">
  771. @import "../../activityPages/index.scss";
  772. .box-content {
  773. padding: 0rpx 34rpx 20rpx !important;
  774. }
  775. .select-sticky {
  776. position: sticky !important;
  777. width: 100%;
  778. top: 78rpx;
  779. z-index: 9999;
  780. background-color: #fff;
  781. .select-conyent {
  782. padding: 0 30rpx;
  783. .decide {
  784. background-color: #F8F8FA;
  785. display: flex;
  786. align-items: center;
  787. margin: 0 auto;
  788. height: 110rpx;
  789. width: 100%;
  790. padding-left: 30rpx;
  791. }
  792. .items-box {
  793. width: 40rpx;
  794. }
  795. .menu-items {
  796. background-color: #F8F8FA;
  797. width: 100%;
  798. display: flex;
  799. flex-wrap: wrap;
  800. padding: 30rpx 30rpx 0;
  801. .menu-items-box {
  802. display: flex;
  803. width: 50%;
  804. font-size: 28rpx;
  805. font-weight: 400;
  806. margin-bottom: 40rpx;
  807. }
  808. }
  809. .replacement-box {
  810. background-color: #fff;
  811. border-radius: 0rpx 0rpx 16rpx 16rpx;
  812. }
  813. .replacement {
  814. margin: 0rpx 30rpx 20rpx;
  815. display: flex;
  816. background-color: #2C83FF;
  817. opacity: 1;
  818. height: 60rpx;
  819. line-height: 58rpx;
  820. font-size: 28rpx;
  821. font-weight: 400;
  822. color: #FFFFFF;
  823. border-radius: 30rpx;
  824. text {
  825. flex: 1;
  826. text-align: center;
  827. }
  828. .replacement-box {
  829. border: 1rpx solid #2C83FF;
  830. opacity: 1;
  831. color: #2C83FF;
  832. background: #FFFFFF;
  833. border-radius: 28rpx 0rpx 28rpx 28rpx;
  834. }
  835. }
  836. }
  837. }
  838. .activity-content .nodata {
  839. padding-top: 80rpx !important;
  840. }
  841. .activity-content .nodataTwo {
  842. padding-top: 280rpx !important;
  843. }
  844. </style>