activity.vue 29 KB

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