activity.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188
  1. <template>
  2. <view class="container activity-content">
  3. <!-- tabs -->
  4. <view class="top-content">
  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}" @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. <!-- 搜索 -->
  15. <view class="index-fixed" v-if="tabsActive==0" @click="goSearch">
  16. <icon type="search" size="15" class="search_ico" />
  17. <text>请输入关键字</text>
  18. </view>
  19. <view class="select-conyent" v-if="tabsActive==0">
  20. <van-dropdown-menu active-color="#333333">
  21. <van-dropdown-item id="statusstate" :title="activeStateName">
  22. <view class="menu-items">
  23. <view class="menu-items-box" @click="overallBtn('statusstate',key)"
  24. v-for="key in listActivityStaus" :key="key.Id">
  25. <view class="items-box">
  26. <u-icon v-if="key.IsChoose" name="checkbox-mark" color="#2C83FF" size="24"></u-icon>
  27. </view>
  28. <text>{{key.StatusName}}</text>
  29. </view>
  30. </view>
  31. <view class="replacement-box">
  32. <view class="replacement">
  33. <text @click="replacementBtn('statusstate')" class="replacement-box">重置</text>
  34. <text @click="replacementConfirm('statusstate')">确定</text>
  35. </view>
  36. </view>
  37. </van-dropdown-item>
  38. <van-dropdown-item id="industry" :title="chartPermissionName">
  39. <view class="decide">
  40. <view class="items-box">
  41. <u-icon v-if="isShowJurisdiction" name="checkbox-mark" color="#2C83FF" size="24">
  42. </u-icon>
  43. </view>
  44. <text @click="isJurisdiction">始终只展示有权限的行业</text>
  45. </view>
  46. <view class="menu-dashed">
  47. </view>
  48. <view class="menu-items">
  49. <view class="menu-items-box" v-for="item in listChartPermission"
  50. :key="item.ChartPermissionId" @click="overallClick('industry',item)">
  51. <view class="items-box">
  52. <u-icon v-if="item.IsChoose" name="checkbox-mark"
  53. :color="isShowJurisdiction?'#ccc':'#2C83FF'" size="24"></u-icon>
  54. </view>
  55. <text>{{item.PermissionName}}</text>
  56. </view>
  57. </view>
  58. <view class="replacement">
  59. <text @click="replacementBtn('industry')" class="replacement-box">重置</text>
  60. <text @click="replacementConfirm('industry')">确定</text>
  61. </view>
  62. </van-dropdown-item>
  63. <van-dropdown-item id="genre" :title="activityTypeName">
  64. <view class="menu-items">
  65. <view class="menu-items-box" @click="overallActivity('genre',item)"
  66. v-for="(item,index) in listActivityType" :key="item.ActivityTypeId">
  67. <view class="items-box">
  68. <u-icon v-if="item.IsChoose" name="checkbox-mark" color="#2C83FF" size="24">
  69. </u-icon>
  70. </view>
  71. <text>{{item.ActivityTypeName}}</text>
  72. </view>
  73. </view>
  74. <view class="replacement">
  75. <text @click="replacementBtn('genre')" class="replacement-box">重置</text>
  76. <text @click="replacementConfirm('genre')">确定</text>
  77. </view>
  78. </van-dropdown-item>
  79. </van-dropdown-menu>
  80. </view>
  81. </view>
  82. <view class="box-content" :class="{head:tabsActive==1}" v-if="haveData">
  83. <view class="content-list" v-for="(item,index) in collectList" :key="index">
  84. <view class="list-top" @click="goDetail(item)">
  85. <view class="list-top-box">
  86. <text class="title">{{item.ActivityTypeName}}</text>
  87. <view class="city" v-if="item.City">
  88. <image src="../../static/img/location.png" mode=""></image>
  89. <text>{{item.City}}</text>
  90. </view>
  91. </view>
  92. <text style="color: #2ACDD9; font-size: 26rpx;" v-if="item.ActiveState==1">未开始</text>
  93. <text style="color: #FF4040; font-size: 26rpx;" v-if="item.ActiveState==2">进行中</text>
  94. <text style="color: #999999; font-size: 26rpx;" v-if="item.ActiveState==3">已结束</text>
  95. </view>
  96. <view class="" style="display: flex;">
  97. <view class="list-center" @click="goDetail(item)">
  98. <text class="title" v-if="item.IsBrackets==1">{{item.ActivityName}}</text>
  99. <text class="title-two" v-else>{{item.ActivityName}}</text>
  100. <view class="setting-center">
  101. <view class="">
  102. <view class="box-expert" style="padding-bottom: 30rpx ;"
  103. v-if="item.ActivityTypeName=='专家电话会'||item.ActivityTypeName=='专家线下沙龙'">
  104. <view style="width: 140rpx;">
  105. 专家背景:
  106. </view>
  107. <view style="width:400rpx;">{{item.Expert}}</view>
  108. </view>
  109. <text style="padding-bottom: 30rpx ;"
  110. v-if="item.ActivityTypeName=='公司调研电话会'||item.ActivityTypeName=='公司线下调研'">嘉宾:{{item.DistinguishedGuest}}</text>
  111. <text style="padding-bottom: 30rpx ;"
  112. v-if="item.ActivityTypeName=='分析师电话会'||item.ActivityTypeName=='分析师线下沙龙'">主讲人:{{item.Speaker}}</text>
  113. </view>
  114. </view>
  115. <text style="padding-bottom: 30rpx ;">活动时间:{{item.ActivityTime}}</text>
  116. </view>
  117. <view class="" style="display: flex;align-items: center;padding-right: 30rpx;">
  118. <u-icon style="padding-bottom: 30rpx ;" name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  119. </view>
  120. </view>
  121. <view class="list-bottom"
  122. v-if="item.ActiveState==1 &&(item.IsLimitPeople==1 && item.ActivityTypeName=='公司调研电话会')">
  123. <view class="multi-text">
  124. <text v-if="item.IsSignup!==1"
  125. @click="wanttosignup(item.ActivityId)">我要报名({{item.SignupNum}}/{{item.LimitPeopleNum}})</text>
  126. <text v-else
  127. @click="signupCancel(item.ActivityId,2,item.ActivityTime)">{{item.SignupType ==1?'取消外呼':'取消报名'}}({{item.SignupNum}}/{{item.LimitPeopleNum}})</text>
  128. </view>
  129. </view>
  130. <view class="list-bottom" v-else-if="item.ActiveState==1">
  131. <view class="multi"
  132. v-if="item.ActivityTypeId==1||item.ActivityTypeId==2||(item.ActivityTypeId==3&&item.IsLimitPeople==0)">
  133. <text class="multi-outbound" v-if="item.IsSignup!==1"
  134. @click="signupAdd(item.ActivityId,1)">预约外呼</text>
  135. <text class="multi-outbound" v-else
  136. @click="signupCancel(item.ActivityId,1,item.ActivityTime)">取消外呼</text>
  137. <text class="multi-remind" v-if="item.IsCancelMeetingReminder==0"
  138. style="border-left: 1px solid #E5E5E5;"
  139. @click="meetingReminderAdd(item.ActivityId)">会议提醒</text>
  140. <text class="multi-remind" v-else style="border-left: 1px solid #E5E5E5;"
  141. @click="meetingReminderCancel(item.ActivityId)">取消会议提醒</text>
  142. </view>
  143. <view class="multi-text" v-else>
  144. <text v-if="item.IsSignup!==1"
  145. @click="signupAdd(item.ActivityId,3)">我要报名({{item.SignupNum}}/{{item.LimitPeopleNum}})</text>
  146. <text v-else
  147. @click="signupCancel(item.ActivityId,3,item.ActivityTime)">取消报名({{item.SignupNum}}/{{item.LimitPeopleNum}})</text>
  148. </view>
  149. </view>
  150. </view>
  151. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage>1" />
  152. </view>
  153. <view class="nodata" v-else>
  154. <image src="@/static/img/act_search.png" mode="" class="nodata_ico"></image>
  155. <text>暂无日程</text>
  156. </view>
  157. <modalDialog :isShow="isShow" :signupType="signupType" :goFollow="goFollow" :signupStatus="signupStatus"
  158. :isCancelShow="isCancelShow" :idTypeCancel="idTypeCancel" @cancelShowBtn="cancelEnsure"
  159. :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :hasPermission="hasPermission"
  160. :jurisdictionList="jurisdictionList" />
  161. <areaCode :isAreaCode="isAreaCode" :areaCode="areaCode" />
  162. <view class="select-box">
  163. <u-popup v-model="selectShow" mode="bottom">
  164. <view style="color: #333333;font-size: 28rpxrpx;">请选择参会方式</view>
  165. <view style="color: #2C83FF;" @click="signupAdd('id',1)">预约外呼</view>
  166. <view style="color: #2C83FF;" @click="signupAdd('id',2)">自主拨入</view>
  167. <view style="color: #A9AFB8;" @click="selectShow=false">取消</view>
  168. </u-popup>
  169. </view>
  170. </view>
  171. </template>
  172. <script>
  173. import {
  174. activity,
  175. User
  176. } from "@/config/api.js"
  177. import {
  178. Throttle
  179. } from '@/config/util.js'
  180. import modalDialog from '@/components/modalDialog.vue'
  181. import areaCode from "@/components/areaCode.vue"
  182. let app = getApp()
  183. export default {
  184. data() {
  185. return {
  186. tabs: [{
  187. name: '全部活动',
  188. id: 1
  189. },
  190. {
  191. name: '我的日程',
  192. id: 2
  193. },
  194. ],
  195. tabsActive: 0,
  196. page_no: 1,
  197. pageSize: 10,
  198. collectList: [],
  199. status: 'loadmore',
  200. totalPage: '',
  201. haveData: true,
  202. loadText: {
  203. loadmore: '上拉加载更多',
  204. loading: '加载中',
  205. nomore: '已经到底了'
  206. },
  207. listActivityStaus: [], //状态
  208. listActivityType: [], //类型
  209. listChartPermission: [], //分类
  210. isShowJurisdiction: '',
  211. activeState: '1', //活动进行状态
  212. activityTypeIds: '', //活动类型id 多个用 , 隔开
  213. chartPermissionIds: '', //行业id 多个用 , 隔开
  214. activeStateName: '未开始',
  215. chartPermissionName: '行业分类',
  216. activityTypeName: '活动类型',
  217. isShowJurisdiction: false,
  218. isGain: true,
  219. signupType: '', //关注类型
  220. goFollow: false, //是否关注公众号
  221. signupStatus: 'Success', //4个不同的类型提示文案
  222. isShow: false, //弹框
  223. isCancelShow: false,
  224. idTypeCancel: {
  225. id: '',
  226. type: 1,
  227. cutId: '',
  228. state: '',
  229. isNum: false
  230. },
  231. isId: 0,
  232. isAreaCode: false,
  233. areaCode: {
  234. id: '',
  235. type: ''
  236. },
  237. isNeedAddCountryCode: false,
  238. selectShow: false,
  239. activityIdAdd: '',
  240. hasPermission: '', //是否有权限
  241. jurisdictionList: {
  242. SellerMobile: '',
  243. PopupMsg: '',
  244. OperationMode: '',
  245. },
  246. isShowhasPermission: false, //拨打销售电话
  247. applyForIsShow: false, //潜在用户
  248. }
  249. },
  250. watch: {
  251. tabsActive() {
  252. },
  253. },
  254. components: {
  255. modalDialog,
  256. areaCode
  257. },
  258. onLoad(option) {
  259. this.countryCcode() //判断是否加区号
  260. if (option.typeName) {
  261. this.activeState = option.statesId //活动进行状态
  262. this.activityTypeIds = option.typeIds //活动类型id 多个用 , 隔开
  263. this.chartPermissionIds = option.chartIds //行业id 多个用 , 隔开
  264. this.activeStateName = option.stateName
  265. this.chartPermissionName = option.chartName
  266. this.activityTypeName = option.typeName
  267. this.tabsActive = option.tabs
  268. this.isGain = false
  269. } else {
  270. this.isGain = true
  271. }
  272. if (this.tabsActive == 1) {
  273. this.getScheduleList()
  274. } else {
  275. if (this.isGain) {
  276. this.getList()
  277. }
  278. this.getUserSearchContent()
  279. }
  280. },
  281. //切换tabs 刷新页面
  282. onTabItemTap() {
  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.getList()
  292. this.getUserSearchContent()
  293. },
  294. methods: {
  295. wanttosignup(id) {
  296. this.activityIdAdd = id
  297. this.selectShow = true
  298. },
  299. //获取列表
  300. getList() {
  301. activity.getActivityList({
  302. PageSize: this.pageSize,
  303. CurrentIndex: this.page_no,
  304. ActiveState: this.activeState, //活动进行状态
  305. ActivityTypeIds: this.activityTypeIds, //活动类型id 多个用 , 隔开
  306. ChartPermissionIds: this.chartPermissionIds, //行业id 多个用 , 隔开
  307. IsShowJurisdiction: this.isId
  308. }).then(res => {
  309. if (res.Ret !== 200) return
  310. this.status = this.page_no < res.Data.Paging.Pages ? 'loadmore' : 'nomore';
  311. this.totalPage = res.Data.Paging.Pages; //总页数
  312. if (this.page_no === 1) {
  313. this.collectList = res.Data.List || [];
  314. this.haveData = this.collectList.length ? true : false
  315. if (this.refresh) {
  316. uni.stopPullDownRefresh();
  317. this.refresh = false;
  318. }
  319. } else {
  320. this.collectList.push(...res.Data.List)
  321. }
  322. })
  323. },
  324. //我的日程
  325. getScheduleList() {
  326. activity.getScheduleList({
  327. PageSize: this.pageSize,
  328. CurrentIndex: this.page_no,
  329. }).then(res => {
  330. if (res.Ret !== 200) return
  331. this.status = this.page_no < res.Data.Paging.Pages ? 'loadmore' : 'nomore';
  332. this.totalPage = res.Data.Paging.Pages; //总页数
  333. if (this.page_no === 1) {
  334. this.collectList = res.Data.List || [];
  335. this.haveData = this.collectList.length ? true : false
  336. if (this.refresh) {
  337. uni.stopPullDownRefresh();
  338. this.refresh = false;
  339. }
  340. } else {
  341. this.collectList.push(...res.Data.List)
  342. }
  343. })
  344. },
  345. //获取活动详情接口
  346. getUserSearchContent(name) {
  347. activity.getUserSearchContent({
  348. IsShowJurisdiction: this.isId
  349. }).then(res => {
  350. this.isShowJurisdiction = res.Data.IsShowJurisdiction
  351. this.listActivityStaus = res.Data.ListActivityStaus
  352. this.listActivityType = res.Data.ListActivityType
  353. this.listChartPermission = res.Data.ListChartPermission || []
  354. if (this.isGain) {
  355. // this.preserve()
  356. } else {
  357. this.shareOption()
  358. }
  359. if (name == 'traverse') {
  360. const hyArr = []
  361. this.listChartPermission.forEach(key => {
  362. if (key.IsChoose) {
  363. hyArr.push(key.ChartPermissionId)
  364. }
  365. })
  366. this.chartPermissionIds = hyArr.join(',')
  367. }
  368. })
  369. },
  370. shareOption() {
  371. const arr = this.activeState.split(',').map(item => item - 0)
  372. this.listActivityStaus.forEach(item => {
  373. if (arr.indexOf(item.Id) !== -1) {
  374. item.IsChoose = true
  375. } else {
  376. item.IsChoose = false
  377. }
  378. })
  379. const hyarr = this.chartPermissionIds.split(',').map(item => item - 0)
  380. this.listChartPermission.forEach(key => {
  381. if (hyarr.indexOf(key.ChartPermissionId) !== -1) {
  382. key.IsChoose = true
  383. } else {
  384. key.IsChoose = false
  385. }
  386. })
  387. const lxarr = this.activityTypeIds.split(',').map(item => item - 0)
  388. this.listActivityType.forEach(key => {
  389. if (lxarr.indexOf(key.ActivityTypeId) !== -1) {
  390. key.IsChoose = true
  391. } else {
  392. key.IsChoose = false
  393. }
  394. })
  395. this.preserve()
  396. },
  397. //获取是否需要填写区号接口
  398. countryCcode() {
  399. User.countryCcode().then(res => {
  400. if (res.Ret == 200) {
  401. this.isNeedAddCountryCode = res.Data.IsNeedAddCountryCode
  402. }
  403. })
  404. },
  405. //报名
  406. signupAdd(id, type) {
  407. if (app.globalData.isBind && !app.globalData.isAuth) {
  408. uni.navigateTo({
  409. url: '/pages/login/login'
  410. })
  411. return
  412. }
  413. this.selectShow = false
  414. if (id == 'id') {
  415. id = this.activityIdAdd
  416. }
  417. if (this.isNeedAddCountryCode) {
  418. this.isAreaCode = true
  419. this.areaCode = {
  420. id,
  421. type,
  422. }
  423. } else {
  424. activity.signupAdd({
  425. ActivityId: id,
  426. SignupType: type,
  427. }).then(res => {
  428. if (res.Ret == 200) {
  429. this.hasPermission = res.Data.HasPermission
  430. if (this.hasPermission == 1) {
  431. const index = this.collectList.findIndex(item => item.ActivityId == id)
  432. this.collectList[index].SignupType = type
  433. if (res.Data.GoFollow && res.Data.SignupStatus !== 'Success' || !res.Data
  434. .GoFollow) {
  435. this.isShow = true
  436. } else {
  437. this.goFollow = res.Data.GoFollow
  438. }
  439. this.signupType = res.Data.SignupType
  440. this.signupStatus = res.Data.SignupStatus
  441. this.idTypeCancel = {
  442. cutId: res.Data.ActivityId,
  443. state: 1
  444. }
  445. } else if (this.hasPermission == 2) {
  446. this.jurisdictionList.SellerMobile = res.Data.SellerMobile
  447. this.jurisdictionList.PopupMsg = res.Data.PopupMsg
  448. this.isShowhasPermission = true
  449. } else if (this.hasPermission == 3 || this.hasPermission == 4) {
  450. this.jurisdictionList.PopupMsg = res.Data.PopupMsg
  451. this.applyForIsShow = true
  452. }
  453. }
  454. })
  455. }
  456. },
  457. //取消报名
  458. signupCancel(id, type, time) {
  459. const str = time.replace(/-/g, '/')
  460. const date = new Date(str)
  461. const times = date.getTime()
  462. const num = new Date().getTime()
  463. if (times - num <= 3600000) {
  464. uni.showModal({
  465. confirmText: '知道了',
  466. showCancel: false,
  467. confirmColor: '#3385FF',
  468. content: type == 1 ? '活动开始前1小时内无法取消预约外呼,请联系对口销售处理' : '活动开始前1小时内无法取消报名,请联系对口销售处理'
  469. })
  470. return
  471. }
  472. this.isCancelShow = true
  473. this.idTypeCancel = {
  474. id,
  475. type,
  476. cutId: '',
  477. state: 0,
  478. isNum: true
  479. }
  480. },
  481. //遍历
  482. preserve() {
  483. const arr = []
  484. const str = []
  485. this.listActivityStaus.forEach(item => {
  486. if (item.IsChoose) {
  487. arr.push(item.Id)
  488. str.push(item.StatusName)
  489. }
  490. })
  491. if (str.length == this.listActivityStaus.length) {
  492. this.activeStateName = '所有状态'
  493. } else if (str.length <= 0) {
  494. this.activeStateName = '活动状态'
  495. } else {
  496. this.activeStateName = str.join(',')
  497. }
  498. this.activeState = arr.join(',')
  499. const hyArr = []
  500. const hyStr = []
  501. this.listChartPermission.forEach(key => {
  502. if (key.IsChoose) {
  503. hyArr.push(key.ChartPermissionId)
  504. hyStr.push(key.PermissionName)
  505. }
  506. })
  507. if (hyStr.length == this.listChartPermission.length) {
  508. this.chartPermissionName = '所有行业'
  509. } else if (hyStr.length <= 0) {
  510. this.chartPermissionName = '行业分类'
  511. } else {
  512. this.chartPermissionName = hyStr.join(',')
  513. }
  514. this.chartPermissionIds = hyArr.join(',')
  515. const lxArr = []
  516. const lxStr = []
  517. this.listActivityType.forEach(key => {
  518. if (key.IsChoose) {
  519. lxArr.push(key.ActivityTypeId)
  520. lxStr.push(key.ActivityTypeName)
  521. }
  522. })
  523. if (lxStr.length == this.listActivityType.length) {
  524. this.activityTypeName = '所有活动'
  525. } else if (lxStr.length <= 0) {
  526. this.activityTypeName = '活动类型'
  527. } else {
  528. this.activityTypeName = lxStr.join(',')
  529. }
  530. this.activityTypeIds = lxArr.join(',')
  531. this.getList()
  532. },
  533. //头部tabs切换
  534. toggleTab(item, index) {
  535. if (this.tabsActive !== index) {
  536. this.tabsActive = index
  537. }
  538. this.page_no = 1
  539. this.collectList = []
  540. this.status = 'loadmore'
  541. if (this.tabsActive == 0) {
  542. this.getList()
  543. } else {
  544. this.getScheduleList()
  545. }
  546. },
  547. //状态的下拉选择
  548. overallBtn(type, item) {
  549. this.listActivityStaus.forEach(key => {
  550. if (key.Id == item.Id) {
  551. key.IsChoose = !key.IsChoose
  552. }
  553. })
  554. },
  555. // 行业的下拉选择
  556. overallClick(type, item) {
  557. if (this.isShowJurisdiction) return
  558. this.listChartPermission.forEach(key => {
  559. if (key.ChartPermissionId == item.ChartPermissionId) {
  560. key.IsChoose = !key.IsChoose
  561. }
  562. })
  563. },
  564. //类型的下拉选择
  565. overallActivity(type, item) {
  566. this.listActivityType.forEach(key => {
  567. if (key.ActivityTypeId == item.ActivityTypeId) {
  568. key.IsChoose = !key.IsChoose
  569. }
  570. })
  571. },
  572. /* 新布局产业选项重置按钮 */
  573. replacementBtn(type) {
  574. if (type == 'statusstate') {
  575. this.listActivityStaus.forEach(item => item.IsChoose = false)
  576. this.listActivityStaus[0].IsChoose = true
  577. this.activeState = '1'
  578. this.activeStateName = '未开始'
  579. } else if (type == 'industry') {
  580. this.chartPermissionIds = ''
  581. this.isShowJurisdiction = false
  582. this.isId = 2
  583. this.getUserSearchContent()
  584. this.listChartPermission.forEach(item => item.IsChoose = false)
  585. this.chartPermissionName = '行业分类'
  586. } else {
  587. this.listActivityType.forEach(item => item.IsChoose = false)
  588. this.activityTypeIds = ''
  589. this.activityTypeName = '活动类型'
  590. }
  591. },
  592. /* 新布局产业选项确定按钮 */
  593. replacementConfirm(type) {
  594. this.page_no = 1
  595. if (type == 'statusstate') {
  596. const arr = []
  597. const str = []
  598. this.listActivityStaus.forEach(key => {
  599. if (key.IsChoose) {
  600. arr.push(key.Id)
  601. str.push(key.StatusName)
  602. }
  603. })
  604. if (str.length == this.listActivityStaus.length) {
  605. this.activeStateName = '所有状态'
  606. } else if (str.length <= 0) {
  607. this.activeStateName = '活动状态'
  608. } else {
  609. this.activeStateName = str.join(',')
  610. }
  611. this.activeState = arr.join(',')
  612. } else if (type == 'industry') {
  613. const arr = []
  614. const str = []
  615. this.listChartPermission.forEach(key => {
  616. if (key.IsChoose) {
  617. arr.push(key.ChartPermissionId)
  618. str.push(key.PermissionName)
  619. }
  620. })
  621. if (str.length == this.listChartPermission.length) {
  622. this.chartPermissionName = '所有行业'
  623. } else if (str.length <= 0) {
  624. this.chartPermissionName = '行业分类'
  625. } else {
  626. this.chartPermissionName = str.join(',')
  627. }
  628. this.chartPermissionIds = arr.join(',')
  629. } else {
  630. const arr = []
  631. const str = []
  632. this.listActivityType.forEach(key => {
  633. if (key.IsChoose) {
  634. arr.push(key.ActivityTypeId)
  635. str.push(key.ActivityTypeName)
  636. }
  637. })
  638. if (str.length == this.listActivityType.length) {
  639. this.activityTypeName = '所有活动'
  640. } else if (str.length <= 0) {
  641. this.activityTypeName = '活动类型'
  642. } else {
  643. this.activityTypeName = str.join(',')
  644. }
  645. this.activityTypeIds = arr.join(',')
  646. }
  647. this.page_no = 1
  648. this.collectList = []
  649. this.getList()
  650. this.selectComponent(`#${type}`).toggle();
  651. },
  652. //去往详情页面
  653. goDetail(item) {
  654. if (!app.globalData.isAuth && !app.globalData.isBind) { // 已授权已绑定
  655. uni.navigateTo({
  656. url: '/pages/activityDetail/activityDetail?id=' + item.ActivityId,
  657. });
  658. } else if (app.globalData.isAuth) { //未授权
  659. uni.navigateTo({
  660. url: '/pages/authGuide/authGuide'
  661. })
  662. } else if (app.globalData.isBind && !app.globalData.isAuth) { //已授权未绑定
  663. uni.navigateTo({
  664. url: '/pages/login/login'
  665. })
  666. }
  667. },
  668. //是否展示有权限的行业
  669. isJurisdiction() {
  670. if (this.isShowJurisdiction) {
  671. this.isId = 2
  672. } else {
  673. this.isId = 1
  674. }
  675. this.getUserSearchContent('traverse')
  676. },
  677. //取消弹框的确认事件
  678. cancelEnsure(obj, type, unm) {
  679. this.selectShow = false
  680. if (this.tabsActive == 0) {
  681. if (obj.cutId == 0) return
  682. if (type == 1) {
  683. this.collectList.forEach(item => {
  684. if (obj.cutId == item.ActivityId) {
  685. item.IsSignup = obj.state
  686. if (unm) {
  687. item.SignupNum = item.SignupNum - 1
  688. } else {
  689. item.SignupNum = item.SignupNum + 1
  690. }
  691. }
  692. })
  693. } else {
  694. this.collectList.forEach(item => {
  695. if (obj.cutId == item.ActivityId) {
  696. item.IsSignup = obj.state
  697. if (unm) {
  698. item.SignupNum = item.SignupNum - 1
  699. } else {
  700. item.SignupNum = item.SignupNum + 1
  701. }
  702. }
  703. })
  704. }
  705. } else {
  706. this.getScheduleList()
  707. }
  708. },
  709. //搜索事件
  710. goSearch() {
  711. /* */
  712. this.$store.dispatch('checkHandle').then(res => {
  713. app.globalData.isAuth = res.IsAuth;
  714. app.globalData.isBind = res.IsBind;
  715. if ((!res.IsAuth) && (!res.IsBind)) { //已授权已绑定
  716. uni.navigateTo({
  717. url: '/pages/activitySearch/activitySearch',
  718. });
  719. } else if (res.IsAuth) { //未授权
  720. uni.navigateTo({
  721. url: '/pages/authGuide/authGuide'
  722. })
  723. } else if (res.IsBind && !res.IsAuth) { //已授权未绑定
  724. uni.navigateTo({
  725. url: '/pages/login/login'
  726. })
  727. }
  728. })
  729. },
  730. //添加会议提醒接口
  731. meetingReminderAdd(id) {
  732. if (app.globalData.isBind && !app.globalData.isAuth) {
  733. uni.navigateTo({
  734. url: '/pages/login/login'
  735. })
  736. return
  737. }
  738. activity.meetingReminderAdd({
  739. ActivityId: id
  740. }).then(res => {
  741. if (res.Ret == 200) {
  742. this.hasPermission = res.Data.HasPermission
  743. if (this.hasPermission == 1) {
  744. uni.showModal({
  745. confirmText: '知道了',
  746. confirmColor: '#3385FF',
  747. content: res.Msg,
  748. showCancel: false,
  749. success: (res) => {
  750. this.collectList.forEach(item => {
  751. if (id == item.ActivityId) {
  752. item.IsCancelMeetingReminder = 1
  753. }
  754. })
  755. }
  756. })
  757. } else if (this.hasPermission == 2) {
  758. this.jurisdictionList.SellerMobile = res.Data.SellerMobile
  759. this.jurisdictionList.PopupMsg = res.Data.PopupMsg
  760. this.isShowhasPermission = true
  761. } else if (this.hasPermission == 3 || this.hasPermission == 4) {
  762. this.jurisdictionList.PopupMsg = res.Data.PopupMsg
  763. this.applyForIsShow = true
  764. }
  765. }
  766. })
  767. },
  768. //取消会议提醒接口
  769. meetingReminderCancel(id) {
  770. activity.meetingReminderCancel({
  771. ActivityId: id
  772. }).then(res => {
  773. if (res.Ret == 200) {
  774. uni.showModal({
  775. confirmText: '知道了',
  776. confirmColor: '#3385FF',
  777. content: res.Msg,
  778. showCancel: false,
  779. success: (res) => {
  780. if (res.confirm) {
  781. this.collectList.forEach(item => {
  782. if (id == item.ActivityId) {
  783. item.IsCancelMeetingReminder = 0
  784. }
  785. })
  786. }
  787. }
  788. })
  789. }
  790. })
  791. },
  792. authentication() {
  793. /* */
  794. this.$store.dispatch('checkHandle').then(res => {
  795. app.globalData.isAuth = res.IsAuth;
  796. app.globalData.isBind = res.IsBind;
  797. })
  798. }
  799. },
  800. onShow() {
  801. this.authentication()
  802. },
  803. /**
  804. * 用户点击分享
  805. */
  806. onShareAppMessage: function(res) {
  807. return {
  808. title: '活动',
  809. path: '/pages/activity/activity?statesId=' + this.activeState + '&typeIds=' + this.activityTypeIds +
  810. '&chartIds=' + this.chartPermissionIds + '&stateName=' + this.activeStateName + '&chartName=' +
  811. this.chartPermissionName + '&typeName=' + this.activityTypeName + '&tabs=' + this.tabsActive,
  812. success: (res) => {},
  813. fail: (err) => {}
  814. }
  815. },
  816. /* 触底 */
  817. onReachBottom: Throttle(function() {
  818. if (this.status === 'nomore') return;
  819. this.status = 'loading';
  820. this.page_no++;
  821. if (this.tabsActive == 0) {
  822. this.getList()
  823. } else {
  824. this.getScheduleList()
  825. }
  826. }),
  827. /* 下拉刷新 */
  828. onPullDownRefresh: Throttle(function() {
  829. this.page_no = 1;
  830. this.refresh = true;
  831. if (this.tabsActive == 0) {
  832. this.getList()
  833. } else {
  834. this.getScheduleList()
  835. }
  836. }),
  837. }
  838. </script>
  839. <style scoped lang="scss">
  840. .activity-content {
  841. background-color: #F7F7F7;
  842. .top-content {
  843. width: 100%;
  844. background-color: #fff;
  845. padding: 0 30rpx;
  846. position: fixed;
  847. top: 0;
  848. left: 0;
  849. z-index: 999;
  850. .tab {
  851. display: flex;
  852. font-size: 32rpx;
  853. color: #707070;
  854. .tab-item {
  855. flex: 1;
  856. text-align: center;
  857. .scroll-tab-item {
  858. height: 78rpx;
  859. line-height: 48rpx;
  860. position: relative;
  861. .border_act {
  862. position: absolute;
  863. height: 6rpx;
  864. width: 340rpx;
  865. left: 0;
  866. bottom: 0rpx;
  867. }
  868. }
  869. .active {
  870. color: #3385FF;
  871. font-weight: bold;
  872. font-size: 34rpx;
  873. }
  874. image {}
  875. }
  876. }
  877. .index-fixed {
  878. margin-top: 40rpx;
  879. width: 100%;
  880. display: flex;
  881. align-items: center;
  882. height: 70rpx;
  883. background: #F6F6F6;
  884. border: 1rpx solid #E5E5E5;
  885. opacity: 1;
  886. border-radius: 35rpx;
  887. padding-left: 34rpx;
  888. color: #8D8D8D;
  889. font-size: 28rpx;
  890. .search_ico {
  891. padding-right: 16rpx;
  892. }
  893. }
  894. .select-conyent {
  895. margin-top: 10rpx;
  896. .decide {
  897. background-color: #F8F8FA;
  898. display: flex;
  899. align-items: center;
  900. margin: 0 auto;
  901. height: 110rpx;
  902. width: 100%;
  903. padding-left: 30rpx;
  904. }
  905. .items-box {
  906. width: 40rpx;
  907. }
  908. .menu-items {
  909. background-color: #F8F8FA;
  910. width: 100%;
  911. display: flex;
  912. flex-wrap: wrap;
  913. padding: 30rpx 30rpx 0;
  914. .menu-items-box {
  915. display: flex;
  916. width: 50%;
  917. font-size: 28rpx;
  918. font-weight: 400;
  919. margin-bottom: 40rpx;
  920. }
  921. }
  922. .replacement-box {
  923. background-color: #fff;
  924. padding-bottom: 40rpx;
  925. border-radius: 0rpx 0rpx 16rpx 16rpx;
  926. }
  927. .replacement {
  928. margin: 0rpx 30rpx 20rpx;
  929. display: flex;
  930. background-color: #2C83FF;
  931. opacity: 1;
  932. height: 60rpx;
  933. line-height: 58rpx;
  934. font-size: 28rpx;
  935. font-weight: 400;
  936. color: #FFFFFF;
  937. border-radius: 30rpx;
  938. text {
  939. flex: 1;
  940. text-align: center;
  941. }
  942. .replacement-box {
  943. border: 1rpx solid #2C83FF;
  944. opacity: 1;
  945. color: #2C83FF;
  946. background: #FFFFFF;
  947. border-radius: 28rpx 0rpx 28rpx 28rpx;
  948. }
  949. }
  950. }
  951. }
  952. .head {
  953. padding-top: 80rpx !important;
  954. }
  955. .menu-dashed {
  956. margin: 0 auto;
  957. width: 682rpx;
  958. border-bottom: 2rpx solid #E5E5E5;
  959. }
  960. .box-content {
  961. padding: 300rpx 34rpx 20rpx;
  962. background-color: #F7F7F7;
  963. .content-list {
  964. box-sizing: border-box;
  965. overflow: hidden;
  966. margin-top: 30rpx;
  967. width: 100%;
  968. background: #FFFFFF;
  969. box-shadow: 0px 3rpx 6rpx rgba(141, 141, 141, 0.16);
  970. border-radius: 16rpx;
  971. font-size: 28rpx;
  972. .list-top {
  973. margin: 0 30rpx;
  974. display: flex;
  975. justify-content: space-between;
  976. border-bottom: 1rpx solid #E5E5E5;
  977. height: 82rpx;
  978. line-height: 82rpx;
  979. color: #333333;
  980. font-size: 32rpx;
  981. .list-top-box {
  982. display: flex;
  983. .title {
  984. color: #333333;
  985. font-size: 30rpx;
  986. font-weight: bold;
  987. }
  988. }
  989. .city {
  990. margin-left: 40rpx;
  991. display: flex;
  992. color: #3385FF;
  993. align-items: center;
  994. font-size: 26rpx;
  995. image {
  996. width: 27rpx;
  997. height: 32rpx;
  998. margin-right: 12rpx;
  999. }
  1000. }
  1001. }
  1002. .list-center {
  1003. width: 100%;
  1004. color: #333333;
  1005. .title {
  1006. padding: 20rpx 30rpx 24rpx 30rpx;
  1007. line-height: 46rpx;
  1008. color: #333;
  1009. font-size: 28rpx;
  1010. font-weight: bold;
  1011. text-indent: -14rpx
  1012. }
  1013. .title-two {
  1014. padding-left: 30rpx;
  1015. padding-bottom: 24rpx;
  1016. padding-top: 20rpx;
  1017. line-height: 46rpx;
  1018. color: #333;
  1019. font-size: 28rpx;
  1020. font-weight: bold;
  1021. }
  1022. text {
  1023. padding-left: 30rpx;
  1024. }
  1025. .setting-center {
  1026. display: flex;
  1027. align-items: center;
  1028. justify-content: space-between;
  1029. padding-right: 30rpx;
  1030. .box-expert {
  1031. margin-left: 30rpx;
  1032. display: flex;
  1033. }
  1034. }
  1035. }
  1036. .list-bottom {
  1037. height: 80rpx;
  1038. // border-top: 1px solid #E5E5E5;
  1039. .multi {
  1040. display: flex;
  1041. text-align: center;
  1042. line-height: 80rpx;
  1043. color: #3385FF;
  1044. text {
  1045. width: 50%;
  1046. }
  1047. .multi-outbound {
  1048. background: #3385FF;
  1049. color: #FFFFFF;
  1050. border-radius: 0px 0px 0px 16rpx;
  1051. }
  1052. .multi-remind {
  1053. background: #EBF4FF;
  1054. color: #3385FF;
  1055. border-radius: 0px 0px 16rpx 0px;
  1056. }
  1057. }
  1058. .multi-text {
  1059. line-height: 80rpx;
  1060. color: #FFFFFF;
  1061. width: 100%;
  1062. text-align: center;
  1063. background: #3385FF;
  1064. opacity: 1;
  1065. border-radius: 0px 0px 16rpx 16rpx;
  1066. }
  1067. }
  1068. }
  1069. }
  1070. .nodata {
  1071. padding-top: 350rpx;
  1072. image {
  1073. width: 374rpx;
  1074. height: 288rpx;
  1075. }
  1076. }
  1077. .select-box {
  1078. width: 100%;
  1079. view {
  1080. height: 95prx;
  1081. line-height: 95rpx;
  1082. text-align: center;
  1083. font-size: 32rpx;
  1084. border-bottom: 1rpx solid #EBEBEB;
  1085. ;
  1086. }
  1087. }
  1088. /deep/.van-dropdown-menu {
  1089. background-color: #fff;
  1090. box-shadow: none !important;
  1091. padding-top: 20rpx;
  1092. }
  1093. /deep/.van-dropdown-menu__item {
  1094. box-sizing: border-box;
  1095. width: 190rpx;
  1096. margin-right: 40rpx;
  1097. padding-right: 20rpx;
  1098. height: 51rpx;
  1099. border-radius: 26rpx;
  1100. background: #F8F8FA;
  1101. }
  1102. /deep/.van-dropdown-item {
  1103. margin-top: -10rpx;
  1104. }
  1105. /deep/[data-index='2'] {
  1106. margin-right: 0rpx;
  1107. }
  1108. /deep/ .van-ellipsis {
  1109. font-size: 24rpx;
  1110. }
  1111. }
  1112. </style>