activitySearch.vue 33 KB

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