activity.vue 26 KB

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