activity.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879
  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" @open="isscroll" :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" @open="isscroll" :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" @open="isscroll" :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. isScrollShow:false
  247. };
  248. },
  249. mixins: [myMixin],
  250. components: {
  251. modalDialog,
  252. areaCode,
  253. },
  254. onLoad(option) {
  255. this.$store.dispatch("checkHandle", 'load').then(res => {
  256. app.globalData.isAuth = res.IsAuth;
  257. app.globalData.isBind = res.IsBind;
  258. this.countryCcode(); //判断是否加区号
  259. if (Object.keys(option).length !== 0) {
  260. this.activeState = option.statesId; //活动进行状态
  261. this.activityTypeIds = option.typeIds; //活动类型id 多个用 , 隔开
  262. this.chartPermissionIds = option.chartIds; //行业id 多个用 , 隔开
  263. this.activeStateName = option.stateName;
  264. this.chartPermissionName = option.chartName;
  265. this.activityTypeName = option.typeName;
  266. this.activityTimeStatus = option.timeStatus;
  267. this.spanIndex = option.indexs ? option.indexs.split(',').map(item => item - 0) : []
  268. this.keyWord = option.keys
  269. this.isGain = false;
  270. } else {
  271. this.isGain = true;
  272. }
  273. if (this.isGain) {
  274. this.getList();
  275. }
  276. this.getUserSearchContent();
  277. })
  278. this.fastSearchKeWord()
  279. },
  280. //切换tabs 刷新页面
  281. onTabItemTap() {
  282. if (this.page_no > 1 || this.tabsActive !== 0 || this.collectList !== []) {
  283. this.tabsActive = 0;
  284. this.activeStateName = "未开始";
  285. this.chartPermissionName = "行业分类";
  286. this.activityTypeName = "活动类型";
  287. this.activeState = "1"; //活动进行状态
  288. this.activityTypeIds = ""; //活动类型id 多个用 , 隔开
  289. this.chartPermissionIds = ""; //行业id 多个用 , 隔开
  290. this.page_no = 1;
  291. this.collectList = [];
  292. this.spanIndex=[]
  293. this.keyWord= ''
  294. this.activityTimeList.forEach(key => {key.IsChoose=false})
  295. this.activityTimeStatus=''
  296. this.getList();
  297. this.getUserSearchContent();
  298. }
  299. },
  300. methods: {
  301. isscroll(){
  302. this.isScrollShow=true
  303. },
  304. shareOption() {
  305. const arr = this.activeState.split(',').map(item => item - 0)
  306. this.listActivityStaus.forEach(item => {
  307. if (arr.indexOf(item.Id) !== -1) {
  308. item.IsChoose = true
  309. } else {
  310. item.IsChoose = false
  311. }
  312. })
  313. const arrTwo = this.activityTimeStatus.split(',').map(item => item - 0)
  314. this.activityTimeList.forEach(item => {
  315. if (arrTwo.indexOf(item.Id) !== -1) {
  316. item.IsChoose = true
  317. } else {
  318. item.IsChoose = false
  319. }
  320. })
  321. const hyarr = this.chartPermissionIds.split(',').map(item => item - 0)
  322. this.listChartPermission.forEach(key => {
  323. if (hyarr.indexOf(key.ChartPermissionId) !== -1) {
  324. key.IsChoose = true
  325. } else {
  326. key.IsChoose = false
  327. }
  328. })
  329. const lxarr = this.activityTypeIds.split(',').map(item => item - 0)
  330. this.listActivityType.forEach(key => {
  331. if (lxarr.indexOf(key.ActivityTypeId) !== -1) {
  332. key.IsChoose = true
  333. } else {
  334. key.IsChoose = false
  335. }
  336. })
  337. this.preserve()
  338. },
  339. fastSearchKeWord() {
  340. activity.fastSearchKeWord().then(res => {
  341. if (res.Ret !== 200) return
  342. this.dynamicList = res.Data.List || []
  343. })
  344. },
  345. //获取列表
  346. getList() {
  347. activity
  348. .getActivityList({
  349. PageSize: this.pageSize,
  350. CurrentIndex: this.page_no,
  351. ActiveState: this.activeState, //活动进行状态
  352. ActivityTypeIds: this.activityTypeIds, //活动类型id 多个用 , 隔开
  353. ChartPermissionIds: this.chartPermissionIds, //行业id 多个用 , 隔开
  354. IsShowJurisdiction: this.isId,
  355. KeyWord: this.keyWord,
  356. WhichDay: this.activityTimeStatus
  357. })
  358. .then((res) => {
  359. if (res.Ret !== 200) return;
  360. this.status =
  361. this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  362. this.totalPage = res.Data.Paging.Pages; //总页数
  363. if (this.page_no === 1) {
  364. this.collectList = res.Data.List || [];
  365. this.haveData = this.collectList.length ? true : false;
  366. if (this.refresh) {
  367. uni.stopPullDownRefresh();
  368. this.refresh = false;
  369. }
  370. } else {
  371. this.collectList.push(...res.Data.List);
  372. }
  373. });
  374. },
  375. //我的日程
  376. getScheduleList() {
  377. activity
  378. .getScheduleList({
  379. PageSize: this.pageSize,
  380. CurrentIndex: this.page_no,
  381. })
  382. .then((res) => {
  383. if (res.Ret !== 200) return;
  384. this.status =
  385. this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  386. this.totalPage = res.Data.Paging.Pages || ''; //总页数
  387. if (this.page_no === 1) {
  388. this.collectList = res.Data.List || [];
  389. this.haveData = this.collectList.length ? true : false;
  390. if (this.refresh) {
  391. uni.stopPullDownRefresh();
  392. this.refresh = false;
  393. }
  394. } else {
  395. this.collectList.push(...res.Data.List);
  396. }
  397. });
  398. },
  399. //获取活动详情接口
  400. getUserSearchContent(name) {
  401. activity
  402. .getUserSearchContent({
  403. IsShowJurisdiction: this.isId,
  404. })
  405. .then((res) => {
  406. this.isShowJurisdiction = res.Data.IsShowJurisdiction;
  407. this.listActivityStaus = res.Data.ListActivityStaus;
  408. this.listActivityType = res.Data.ListActivityType;
  409. this.listChartPermission = res.Data.ListChartPermission || [];
  410. this.listChartPermissionInit = res.Data.ListChartPermission2
  411. if (name == "traverse") {
  412. const hyArr = [];
  413. this.listChartPermission.forEach((key) => {
  414. if (key.IsChoose) {
  415. hyArr.push(key.ChartPermissionId);
  416. }
  417. });
  418. this.chartPermissionIds = hyArr.join(",");
  419. }
  420. if (this.isGain) {
  421. // this.preserve()
  422. } else {
  423. this.shareOption()
  424. }
  425. });
  426. },
  427. //头部tabs切换
  428. toggleTab(item, index) {
  429. if (this.tabsActive !== index) {
  430. this.tabsActive = index;
  431. }
  432. this.$store.dispatch('checkHandle').then(res => {
  433. app.globalData.isAuth = res.IsAuth;
  434. app.globalData.isBind = res.IsBind;
  435. if ((!res.IsAuth) && (!res.IsBind)) { //已授权已绑定
  436. this.page_no = 1;
  437. this.collectList = [];
  438. this.status = "loadmore";
  439. if (this.tabsActive == 0) {
  440. this.getList();
  441. } else {
  442. this.getScheduleList();
  443. }
  444. } else if (res.IsAuth) { //未授权
  445. this.tabsActive = 0
  446. uni.navigateTo({
  447. url: '/pages/authGuide/authGuide'
  448. })
  449. } else if (res.IsBind && !res.IsAuth) { //已授权未绑定
  450. this.tabsActive = 0
  451. uni.navigateTo({
  452. url: '/pages/login/login'
  453. })
  454. }
  455. })
  456. },
  457. //取消弹框的确认事件
  458. cancelEnsure(obj, type, unm) {
  459. this.init()
  460. if (obj.name == "conference") return;
  461. if (this.tabsActive == 0) {
  462. if (obj.cutId == 0) return;
  463. if (type == 1) {
  464. this.collectList.forEach((item) => {
  465. if (obj.cutId == item.ActivityId) {
  466. item.IsSignup = obj.state;
  467. if (unm) {
  468. item.SignupNum = item.SignupNum - 1;
  469. } else {
  470. item.SignupNum = item.SignupNum + 1;
  471. }
  472. }
  473. });
  474. } else {
  475. this.collectList.forEach((item) => {
  476. if (obj.cutId == item.ActivityId) {
  477. item.IsSignup = obj.state;
  478. if (unm) {
  479. item.SignupNum = item.SignupNum - 1;
  480. } else {
  481. item.SignupNum = item.SignupNum + 1;
  482. }
  483. }
  484. });
  485. }
  486. } else {
  487. this.getScheduleList();
  488. }
  489. },
  490. //搜索事件
  491. goSearch() {
  492. this.public('show', true, "/activityPages/activitySearch/activitySearch")
  493. },
  494. //添加会议提醒接口
  495. meetingReminderAdd(id) {
  496. this.$store.dispatch("checkHandle").then((res) => {
  497. app.globalData.isAuth = res.IsAuth;
  498. app.globalData.isBind = res.IsBind;
  499. })
  500. if (app.globalData.isBind && !app.globalData.isAuth) {
  501. uni.navigateTo({
  502. url: "/pages/login/login",
  503. });
  504. return;
  505. } else if (app.globalData.isAuth) {
  506. uni.navigateTo({
  507. url: '/pages/authGuide/authGuide'
  508. })
  509. return
  510. }
  511. activity
  512. .meetingReminderAdd({
  513. ActivityId: id,
  514. })
  515. .then((res) => {
  516. if (res.Ret == 200) {
  517. this.hasPermission = res.Data.HasPermission;
  518. if (this.hasPermission == 1) {
  519. if (
  520. (res.Data.GoFollow && res.Data.SignupStatus !== "Success") ||
  521. !res.Data.GoFollow
  522. ) {
  523. this.isShow = true;
  524. } else {
  525. this.goFollow = res.Data.GoFollow;
  526. }
  527. this.signupType = 999;
  528. this.signupStatus = res.Data.SignupStatus;
  529. this.idTypeCancel = {
  530. cutId: res.Data.ActivityId,
  531. state: 1,
  532. name: "conference",
  533. };
  534. this.collectList.forEach((item) => {
  535. if (id == item.ActivityId) {
  536. item.IsCancelMeetingReminder = 1;
  537. }
  538. });
  539. } else if (this.hasPermission == 2) {
  540. this.jurisdictionList.SellerMobile = res.Data.SellerMobile;
  541. this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
  542. this.isShowhasPermission = true;
  543. } else if (this.hasPermission == 3 || this.hasPermission == 4) {
  544. this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
  545. this.applyForIsShow = true;
  546. }
  547. }
  548. });
  549. },
  550. //取消会议提醒接口
  551. meetingReminderCancel(id) {
  552. activity
  553. .meetingReminderCancel({
  554. ActivityId: id,
  555. })
  556. .then((res) => {
  557. if (res.Ret == 200) {
  558. uni.showModal({
  559. confirmText: "知道了",
  560. confirmColor: "#3385FF",
  561. content: res.Msg,
  562. showCancel: false,
  563. success: (res) => {
  564. if (res.confirm) {
  565. this.collectList.forEach((item) => {
  566. if (id == item.ActivityId) {
  567. item.IsCancelMeetingReminder = 0;
  568. }
  569. });
  570. }
  571. if (this.tabsActive !== 0) {
  572. this.status = "loading";
  573. this.page_no = 1;
  574. this.getScheduleList();
  575. }
  576. },
  577. });
  578. }
  579. });
  580. },
  581. //遍历
  582. preserve() {
  583. const arr = []
  584. const str = []
  585. this.listActivityStaus.forEach(item => {
  586. if (item.IsChoose) {
  587. arr.push(item.Id)
  588. str.push(item.StatusName)
  589. }
  590. })
  591. // if (str.length == this.listActivityStaus.length) {
  592. // this.activeStateName = '所有状态'
  593. // } else {
  594. // this.activeStateName = str.join(',')
  595. // }
  596. this.activeState = arr.join(',')
  597. const arrTwo = []
  598. const strTwo=[]
  599. this.activityTimeList.forEach(key => {
  600. if (key.IsChoose) {
  601. arrTwo.push(key.Id)
  602. strTwo.push(key.StatusName)
  603. }
  604. })
  605. if (strTwo.length > 0) {
  606. this.activeStateName = strTwo.join(',')
  607. }else{
  608. if (str.length == this.listActivityStaus.length) {
  609. this.activeStateName = '所有状态'
  610. } else {
  611. this.activeStateName = str.join(',')
  612. }
  613. }
  614. this.activityTimeStatus = arrTwo.join(',')
  615. const hyArr = []
  616. const hyStr = []
  617. this.listChartPermission.forEach(key => {
  618. if (key.IsChoose) {
  619. hyArr.push(key.ChartPermissionId)
  620. hyStr.push(key.PermissionName)
  621. }
  622. })
  623. if (hyStr.length == this.listChartPermission.length && hyStr.length > 0) {
  624. this.chartPermissionName = '所有行业'
  625. } else if (hyStr.length <= 0) {
  626. this.chartPermissionName = '行业分类'
  627. } else {
  628. this.chartPermissionName = hyStr.join(',')
  629. }
  630. this.chartPermissionIds = hyArr.join(',')
  631. const lxArr = []
  632. const lxStr = []
  633. this.listActivityType.forEach(key => {
  634. if (key.IsChoose) {
  635. lxArr.push(key.ActivityTypeId)
  636. lxStr.push(key.ActivityTypeName)
  637. }
  638. })
  639. if (lxStr.length == this.listActivityType.length && lxStr.length > 0) {
  640. this.activityTypeName = '所有活动'
  641. } else if (lxStr.length <= 0) {
  642. this.activityTypeName = '活动类型'
  643. } else {
  644. this.activityTypeName = lxStr.join(',')
  645. }
  646. this.activityTypeIds = lxArr.join(',')
  647. this.getList()
  648. },
  649. //选择标签
  650. changeTarget(index, item) {
  651. // console.log(this.spanIndex);
  652. let arrIndex = this.spanIndex.indexOf(index);
  653. if (arrIndex > -1) {
  654. this.spanIndex.splice(arrIndex, 1);
  655. } else {
  656. this.spanIndex.push(index);
  657. }
  658. const arr = []
  659. this.spanIndex.forEach(item=>{
  660. arr.push(this.dynamicList[item].KeyWord)
  661. })
  662. this.keyWord = arr.join(',')
  663. this.page_no = 1
  664. this.getList()
  665. },
  666. },
  667. onShow() {
  668. this.$store.dispatch("statistics",{PageType:'Activit'})
  669. },
  670. /**
  671. * 用户点击分享
  672. */
  673. onHide() {
  674. if (this.tabsActive !== 0 ) return
  675. this.selectComponent("#statusstate").toggle(false);
  676. this.selectComponent("#industry").toggle(false);
  677. this.selectComponent("#genre").toggle(false);
  678. },
  679. onShareAppMessage: function(res) {
  680. return {
  681. title: "活动",
  682. path: "/pages/activity/activity?statesId=" +
  683. this.activeState +
  684. "&typeIds=" +
  685. this.activityTypeIds +
  686. "&chartIds=" +
  687. this.chartPermissionIds +
  688. "&stateName=" +
  689. this.activeStateName +
  690. "&chartName=" +
  691. this.chartPermissionName +
  692. "&typeName=" +
  693. this.activityTypeName +
  694. "&tabs=" +
  695. this.tabsActive +
  696. "&timeStatus=" +
  697. this.activityTimeStatus +
  698. "&indexs=" + this.spanIndex +
  699. "&keys=" + this.keyWord,
  700. success: (res) => {},
  701. fail: (err) => {},
  702. };
  703. },
  704. /* 触底 */
  705. onReachBottom: Throttle(function() {
  706. if (this.status === "nomore") return;
  707. this.status = "loading";
  708. this.page_no++;
  709. if (this.tabsActive == 0) {
  710. this.getList();
  711. } else {
  712. this.getScheduleList();
  713. }
  714. }),
  715. /* 下拉刷新 */
  716. onPullDownRefresh: Throttle(function() {
  717. this.page_no = 1;
  718. this.refresh = true;
  719. if (this.tabsActive == 0) {
  720. this.getList();
  721. } else {
  722. this.getScheduleList();
  723. }
  724. }),
  725. onPageScroll() {
  726. if (this.tabsActive !== 0 || !this.isScrollShow) return
  727. this.selectComponent("#statusstate").toggle(false);
  728. this.selectComponent("#industry").toggle(false);
  729. this.selectComponent("#genre").toggle(false);
  730. this.isScrollShow=false
  731. },
  732. };
  733. </script>
  734. <style scoped lang="scss">
  735. @import "../../activityPages/index.scss";
  736. .box-content {
  737. padding: 0rpx 34rpx 20rpx !important;
  738. }
  739. .dynamic-content {
  740. padding: 90rpx 30rpx 10rpx;
  741. width: 100%;
  742. background-color: #fff;
  743. display: flex;
  744. flex-wrap: wrap;
  745. border-bottom: 3px solid #F7F7F7;
  746. .target-title {
  747. padding: 5rpx 20rpx 4rpx 5rpx;
  748. border-radius: 20rpx;
  749. margin: 15rpx 20rpx 15rpx 0;
  750. font-size: 30rpx;
  751. color: #2C83FF;
  752. }
  753. .target-item {
  754. padding: 5rpx 20rpx;
  755. color: #2C83FF;
  756. font-size: 30rpx;
  757. font-weight: 400;
  758. font-family: PingFang SC;
  759. background-color: #EBF4FF;
  760. margin: 15rpx 20rpx 15rpx 0;
  761. border-radius: 27rpx;
  762. }
  763. .target-search {
  764. display: flex;
  765. justify-content: center;
  766. align-items: center;
  767. image {
  768. width: 30rpx;
  769. height: 30rpx;
  770. }
  771. }
  772. .bgcolor {
  773. background-color: #3385FF !important;
  774. color: #fff !important;
  775. }
  776. }
  777. .select-sticky {
  778. position: sticky !important;
  779. width: 100%;
  780. top: 78rpx;
  781. z-index: 9999;
  782. background-color: #fff;
  783. .select-conyent {
  784. padding: 0 30rpx;
  785. .decide {
  786. background-color: #F8F8FA;
  787. display: flex;
  788. align-items: center;
  789. margin: 0 auto;
  790. height: 110rpx;
  791. width: 100%;
  792. padding-left: 30rpx;
  793. }
  794. .items-box {
  795. width: 40rpx;
  796. }
  797. .menu-items {
  798. background-color: #F8F8FA;
  799. width: 100%;
  800. display: flex;
  801. flex-wrap: wrap;
  802. padding: 30rpx 30rpx 0;
  803. .menu-items-box {
  804. display: flex;
  805. width: 50%;
  806. font-size: 28rpx;
  807. font-weight: 400;
  808. margin-bottom: 40rpx;
  809. }
  810. }
  811. .replacement-box {
  812. background-color: #fff;
  813. border-radius: 0rpx 0rpx 16rpx 16rpx;
  814. }
  815. .replacement {
  816. margin: 0rpx 30rpx 20rpx;
  817. display: flex;
  818. background-color: #2C83FF;
  819. opacity: 1;
  820. height: 60rpx;
  821. line-height: 58rpx;
  822. font-size: 28rpx;
  823. font-weight: 400;
  824. color: #FFFFFF;
  825. border-radius: 30rpx;
  826. text {
  827. flex: 1;
  828. text-align: center;
  829. }
  830. .replacement-box {
  831. border: 1rpx solid #2C83FF;
  832. opacity: 1;
  833. color: #2C83FF;
  834. background: #FFFFFF;
  835. border-radius: 28rpx 0rpx 28rpx 28rpx;
  836. }
  837. }
  838. }
  839. }
  840. .activity-content .nodata {
  841. padding-top: 80rpx !important;
  842. }
  843. .activity-content .nodataTwo {
  844. padding-top: 280rpx !important;
  845. }
  846. </style>