memberIndex.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910
  1. <template>
  2. <view class="container column hb flex-1 hidden">
  3. <view class="headbox">
  4. <view style="padding: 10px 10px 0 10px;" class="mb20">
  5. <view>
  6. <u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe" activeColor="#1677ff" :fontSize="15" :bold="false" @change="sectionChange"></u-subsection>
  7. </view>
  8. <!-- <view style="width: 70%;">
  9. <u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe" activeColor="#1677ff"
  10. :fontSize="15" :bold="false" @change="sectionChange" ></u-subsection>
  11. </view> -->
  12. <view style="margin-top: 10px;" class="justify-between align-center" v-if="!viewload">
  13. <u-search placeholder="搜索微信名称、手机、标签" v-model="keyword" :showAction="false" height="30px" @search='searchKeyword'></u-search>
  14. <view v-if="current!==0" class="fs24 ml20" @click="blackSel()">{{!isShowSelectAll?'批量管理':'取消批量'}}</view>
  15. </view>
  16. <view class="x-bc" v-if="current==0">
  17. <u-tabs :list="list2" :current='currentType' :lineWidth="40" lineColor="#1677ff" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle" @click="clickTypeTab"></u-tabs>
  18. <view class="participate-order x-f">
  19. <image :src="imgPath+'/app/images/order_icon2.png'" mode="aspectFill" v-if="searchTypeIndex == 0 || searchTypeIndex == 2"></image>
  20. <image :src="imgPath+'/app/images/order_icon.png'" mode="aspectFill" v-else></image>
  21. <picker @change="bindPickerChange" :value="searchTypeIndex" :range="typeArray">
  22. {{typeoption[searchTypeIndex]}}
  23. </picker>
  24. </view>
  25. </view>
  26. <view class="tagbox x-bc" v-if="current==0">
  27. <view class="tagbox-left x-f">
  28. <!-- <view class="x-f" @click="openPop('search')">{{array[queryParam.typeIndex].name}}<u-icon name="arrow-down-fill" color="#2979ff" size="11" style="margin: 0 3px;"></u-icon></view> -->
  29. <view v-if="showCompanytag.length<=0" style="color: #888;" class="ml30">请点击筛选,选择标签</view>
  30. <view class="tagbox-list x-f">
  31. <view class="tagbox-item x-f" v-for="(item,index) in showCompanytag" :key='item.tagId' :class="item.checked?'checked-bg':''">
  32. {{item.tagName}}
  33. </view>
  34. </view>
  35. </view>
  36. <view class="tagbox-right x-f" @click="openPop('tag')">筛选<u-icon name="arrow-down" color="#1677ff" size="12"></u-icon></view>
  37. </view>
  38. </view>
  39. <view v-if="current==0&&!viewload">
  40. <dropdownPanel :filterData='filterData' @onClick="getactNav" :itemname='itemname' @onChange="onChange" @confirm="confirm" @reset="reset" :ispopshow='ispopshow' :top="tops">
  41. <view v-if="filterData[searchbarNav].type == 'userStatus'">
  42. <view class="boxnav x-bc">
  43. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  44. <view class="boxnav-item-info one-t"
  45. :class="userStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('userStatus',index,item.id)">{{item.label}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. <view v-if="filterData[searchbarNav].type == 'registerTime'">
  50. <view class="boxnav x-bc ">
  51. <view class="boxnav-item" style="width: 25%;" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  52. <view class="boxnav-item-info one-t" :class="registerTimeIndex == index ? 'boxnav-active':''" @click="handleParamItem('registerTime',index)">{{item.label}}</view>
  53. </view>
  54. <view class="boxnav-item x-ac" style="width: 100%;" v-show="registerTimeIndex == 4">
  55. <view class="calendar-day x-c" @click="$refs.calendar.open()">
  56. <u-icon name="calendar" color="#999" size="20"></u-icon>{{queryParam.startTime || '选择日期'}}
  57. </view>
  58. <view class="calendar-day x-c" @click="$refs.calendar.open()">
  59. <u-icon name="calendar" color="#999" size="20"></u-icon>{{queryParam.endTime || '选择日期'}}
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. <view v-if="filterData[searchbarNav].type == 'watchStatus'">
  65. <view class="boxnav x-bc">
  66. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  67. <view class="boxnav-item-info one-t" :class="watchStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('watchStatus',index)">{{item.label}}</view>
  68. </view>
  69. </view>
  70. </view>
  71. <view v-if="filterData[searchbarNav].type == 'courseStatus'">
  72. <view class="boxnav x-bc">
  73. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  74. <view class="boxnav-item-info one-t" :class="courseStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('courseStatus',index)">{{item.label}}</view>
  75. </view>
  76. </view>
  77. </view>
  78. <view v-if="filterData[searchbarNav].type == 'project'">
  79. <view class="boxnav x-bc">
  80. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  81. <view class="boxnav-item-info one-t" :class="projectStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('project',index,item.id)">{{item.label}}</view>
  82. </view>
  83. </view>
  84. </view>
  85. </dropdownPanel>
  86. </view>
  87. </view>
  88. <view class="">
  89. <uni-calendar ref="calendar" :clear-date="true" :date="date" :insert="false" :lunar="false"
  90. :startDate="$u.timeFormat(new Date().getTime() - (3600 * 24 * 365 * 1000), 'yyyy-mm-dd')" :range='true'
  91. @confirm="confirmCalendar" :endDate="$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')" />
  92. </view>
  93. <view class="">
  94. <!-- 搜索选择弹窗/标签筛选 -->
  95. <u-popup :show="showPop" :round="12" @close="closePop" class="model" :zIndex="10076" style="flex: 0;">
  96. <view class="popbox">
  97. <view class="popbox-head">
  98. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24"
  99. @click="closePop"></u-icon>
  100. {{popTitle}}
  101. </view>
  102. <view class="popbox-body">
  103. <view class="radiobox" v-show="popTitle == '搜索选择'">
  104. <label class="radiobox-item x-bc mbline" v-for="(item, index) in array" :key="item.value"
  105. @click="bindTypeChange(index)">
  106. <view>{{item.name}}</view>
  107. <radio :value="item.value" :checked="index === typeIndex"
  108. style="transform:scale(0.75)" />
  109. </label>
  110. </view>
  111. <!-- <input placeholder="请输入标签 多个标签用 , 隔开" /> -->
  112. <view class="mb20" v-if="current==0">
  113. <u-search placeholder="请输入标签 多个标签用 , 隔开" v-model="tagkeywords" :showAction="false" height="30px" @search='getcompanyTag'></u-search>
  114. </view>
  115. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds" :refresher-triggered="triggereds" refresher-background="rgba(0,0,0,0)" @refresherrefresh="pullDownRefreshs" @refresherrestore="triggereds = false"
  116. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggereds = false"
  117. @scrolltolower="reachBottoms">
  118. <view class="tagbox-list x-f">
  119. <view class="tagbox-item x-f tag-active" v-if="companytag.length<=0">暂无标签</view>
  120. <view class="mlr10 mb10" v-for="(item,index) in companytag" :key='item.tagId'>
  121. <u-tag :text="item.tagName" :plain="!item.checked" :name="index" @click="chooseTag(index)"></u-tag>
  122. </view>
  123. </view>
  124. <view class="center fs24 mt20">
  125. <text class="mr20" @click="getTagpage('last')">上一页</text>
  126. <text class="base-color-red">{{pagetag.pageNum}}/{{pagetag.pages}}</text>
  127. <text class="ml20" @click="getTagpage('next')">下一页</text>
  128. </view>
  129. </scroll-view>
  130. </view>
  131. <view class="popbox-footer x-bc">
  132. <button class="popbox-footer-btn" @click="resetPop" v-show="popTitle == '标签筛选'">重置</button>
  133. <button class="popbox-footer-btn" @click="closePop" v-show="popTitle == '搜索选择'">取消</button>
  134. <button class="popbox-footer-btn con-btn" @click="confirmPop">确定</button>
  135. </view>
  136. </view>
  137. </u-popup>
  138. </view>
  139. <view class="userbox column hb hidden flex-1">
  140. <!-- <mescroll-body bottom="0" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback" @up="upCallback"> -->
  141. <view class="userlist column hb hidden flex-1">
  142. <vipUserItem :viplist='userList' :isShowSelectAll="isShowSelectAll" @changeItem="changeItem" @getuserId='singleChange' @getlableId='singleChangeLable' @change='changesinglevip' @getuserIds='singleDelete' @pullDownRefresh="getfsuserListdata('refresh')"
  143. @changelistname="getfsuserListdata('more')" @reachBottom="getfsuserListdata()" @changePageOptions="e=>pageOptions=e" :pageOptions="pageOptions" :status="status"
  144. @changeStatus="e=>status=e" class="pb2 hb" />
  145. <view class="justify-between base-bg-f foot-select pb40" v-if="isShowSelectAll">
  146. <view class="align-center justify-between" v-if="isShowSelectAll">
  147. <u-checkbox-group @change="selectAll">
  148. <u-checkbox :checked="isSelectAll" shape="circle" activeColor="#FF6C47" :name="true" label="全选" labelColor="#333" /><text class="fs24 base-color-9 ml12">已选 {{selectedCount}}
  149. 个</text>
  150. </u-checkbox-group>
  151. </view>
  152. <view class="justify-center ">
  153. <button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeProhibit" v-if="current==0">禁用</button>
  154. <button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeblack" v-else>取消禁用</button>
  155. <button class="base-bg-blue radius100 colorf h62 fs28 lh62" @click="changetagall" v-if="current==0">改标签</button>
  156. <!-- <button class="base-bg-f radius100 base-color-red h62 ml10 fs28 lh60"
  157. style="border: #ef4c50 solid 2rpx;"
  158. @click="changevipuser" v-if="current==0">更换归属</button> -->
  159. </view>
  160. </view>
  161. </view>
  162. <!-- </mescroll-body> -->
  163. </view>
  164. <!-- <u-picker :show="showTagSelect" :columns="companytag" keyName="tag" @cancel='showTagSelect=false'
  165. @confirm='singleChangeLable' ></u-picker> -->
  166. <view>
  167. <u-popup :show="projectbox" :round="12" @close="projectbox = false" :zIndex="10074" style="flex: 0;">
  168. <view class="pb120">
  169. <view class="center bold fs32 mt30">选择项目</view>
  170. <view class="p20 justify-start mb60" style="flex-wrap: wrap">
  171. <view class="plr16 ptb8 u-border mlr10 radius8 " :class="projectId==item.dictValue?'probgsel':'probg'"
  172. v-for="(item,index) in projectList" :key="index" @click="selproject(item)">
  173. {{item.dictLabel}}
  174. </view>
  175. </view>
  176. <view class="quedingpro" @click="submitPro">确定</view>
  177. </view>
  178. </u-popup>
  179. <u-popup :show="showTagSelect" @close='closetagselect' :closeOnClickOverlay='true' mode="bottom"
  180. style="z-index: 999;">
  181. <view class=" w100 bgf pb120">
  182. <view class="plr28 ptb16 justify-between" style="flex-direction: row-reverse">
  183. <u-icon class="" name="close-circle" color="#ccc" size="24" @click="closetagselect"></u-icon>
  184. </view>
  185. <view class="mb20">
  186. <u-search placeholder="请输入标签 多个标签用 , 隔开" v-model="tagchangekeywords" :showAction="false"
  187. height="30px" @search='getcompanyTags'></u-search>
  188. </view>
  189. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  190. :refresher-triggered="triggeredsA" refresher-background="rgba(0,0,0,0)"
  191. @refresherrefresh="pullDownRefreshsA" @refresherrestore="triggeredsA = false"
  192. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggeredsA = false">
  193. <view class="justify-start p32 wrap">
  194. <view class="mlr10 mt10 " v-for="(item,index) in changetag" :key='item.tagId'>
  195. <u-tag :text="item.tag" :plain="!item.checked" :name="index"
  196. @click="choosechangeTag"></u-tag>
  197. </view>
  198. </view>
  199. <view class="center fs24 mt20">
  200. <text class="mr20" @click="getTagpageS('last')">上一页</text>
  201. <text class="base-color-red">{{pagetagA.pageNum}}/{{pagetagA.pages}}</text>
  202. <text class="ml20" @click="getTagpageS('next')">下一页</text>
  203. </view>
  204. </scroll-view>
  205. <view class="justify-between p32 " :class="isShowSelectAll?'pb120':''">
  206. <view class="changetagbtn base-bg-f8" @click="showTagSelect=!showTagSelect">取消</view>
  207. <view class="changetagbtn colorf base-bg-blue" @click="suretagchangeAll">确定</view>
  208. </view>
  209. </view>
  210. </u-popup>
  211. </view>
  212. <view class="invite-member" :style="{right:vipInviteshow?'-72rpx':'20rpx'}">
  213. <image :src="imgPath+'/app/images/invite-member-icon.png'" mode="aspectFill" @click="vipInvite"
  214. style="position: relative;" class="intimg"> </image>
  215. <image :src="imgPath+'/app/image/tc_close_icon.png'" class="falseimg" @click="showinimg"></image>
  216. </view>
  217. <view class="">
  218. <!-- 邀请弹窗 -->
  219. <u-popup :show="invitePop" :round="12" @close="invitePop = false" :zIndex="10074" style="flex: 0;">
  220. <view class="popbox">
  221. <view class="popbox-head">
  222. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24"
  223. @click="invitePop = false"></u-icon>
  224. 分享方式
  225. </view>
  226. <view class="popbox-body">
  227. <view class="choosetitle x-bc">
  228. <view>选择标签</view>
  229. <view v-if="sharetaglist" style="color:#1677ff" @click="addtag(0)">{{zhanshitag}}</view>
  230. <view class="x-f" style="color:#1677ff;" v-else @click="addtag(0)">
  231. <u-icon name="plus" color="#1677ff" size="14" style="margin-right: 5px;"></u-icon>添加标签
  232. </view>
  233. </view>
  234. <view class="invitetip">选择标签,当会员注册成功后,即可自动打标签</view>
  235. <!-- <view class="tagbox-list x-f" style="margin-top: 10px;margin-left: 0px;">
  236. <view class="tagbox-item x-f" @click="chooseTag">未打标签</view>
  237. <view class="tagbox-item x-f tag-active">未打标签</view>
  238. </view> -->
  239. <!--#ifdef MP-WEIXIN-->
  240. <view class="justify-center" style="margin-top: 10px;">
  241. <!--#endif-->
  242. <!--#ifdef H5-->
  243. <view class="justify-center" style="margin-top: 10px;">
  244. <!--#endif-->
  245. <!-- <view class="x-bc " style="margin-top: 30px;"> -->
  246. <!--#ifdef MP-WEIXIN-->
  247. <view class="sharePop-item y-f " style="text-align: center;">
  248. <!--#endif-->
  249. <!--#ifdef H5-->
  250. <view class="sharePop-item y-f card-share" @click="shareimg"
  251. style="text-align: center;">
  252. <!--#endif-->
  253. <image :src="imgPath+'/app/images/card_icon.png'" mode="aspectFill"
  254. style="width: 80rpx; height: 80rpx;margin-top: 20rpx;">
  255. </image>
  256. <view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
  257. <view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
  258. <!-- #ifdef MP-WEIXIN -->
  259. <button open-type="share" class="share">分享卡片</button>
  260. <!-- #endif -->
  261. </view>
  262. <!--#ifdef H5-->
  263. <view class="sharePop-item y-f " @click="buildimg" style="text-align: center;">
  264. <image :src="imgPath+'/app/images/poster_icon.png'" mode="aspectFill"></image>
  265. <view style="font-weight: bold;margin-bottom: 4px;">生成海报</view>
  266. <view style="font-size: 12px;color: #888;">保存海报美观宣传</view>
  267. </view>
  268. <view class="sharePop-item y-f " @click="copyLink" style="text-align: center;">
  269. <image :src="imgPath+'/app/images/link_icon.png'" mode="aspectFill"></image>
  270. <view style="font-weight: bold;margin-bottom: 4px;">复制链接</view>
  271. <view style="font-size: 12px;color: #888; ">生成链接一键复制</view>
  272. </view>
  273. <!--#endif-->
  274. </view>
  275. </view>
  276. </view>
  277. </u-popup>
  278. <!-- 设置链接有效时长弹窗 -->
  279. <u-modal :show="setTimeShow" content='content' class="model" @confirm="confirmTime">
  280. <view class="setTimebox">
  281. <view class="timetip">不传默认以系统参数为准</view>
  282. <view class="x-f">
  283. <text style="margin-right: 20px;">链接有效时长(分钟)</text>
  284. <u-input fontSize="14px" placeholder="链接有效时长" border="none" v-model="time"
  285. maxlength="5"></u-input>
  286. </view>
  287. </view>
  288. </u-modal>
  289. <!-- 长按保存海报 -->
  290. <u-popup :show="setImg" @close="closeimg" :round="12">
  291. <view class="w100 h500 center">
  292. <image :src="codeLink.url" mode="aspectFill"></image>
  293. </view>
  294. <view class="justify-around mb40">
  295. <view class="column justify-center align-center" @click="downimg">
  296. <image :src="imgPath+'/app/image/downicon.png'" class="w80 h80"></image>
  297. <view class="mt10">长按图片保存</view>
  298. </view>
  299. </view>
  300. </u-popup>
  301. <!-- 卡片分享引导 -->
  302. <u-overlay :show="showzhidao" @click="showzhidao = false" style="z-index: 9999;">
  303. <view class="point-box">
  304. <view class="imgshe">
  305. <image :src="imgPath+'/app/image/point.png'" class="w300 h300"></image>
  306. </view>
  307. <view class="column colorf fs32 xu-box fs40
  308. align-center justify-center">
  309. <view class="justify-center">点击右上角
  310. <image :src="imgPath+'/app/image/wxmore.png'" class="w50 h50 mlr10"></image>
  311. </view>
  312. <view class="mt20">选择 “转发给朋友”</view>
  313. <view style="color: #cbcbcb;" class="fs28 mt40">点击任意位置关闭弹窗</view>
  314. </view>
  315. </view>
  316. </u-overlay>
  317. <!-- 更改归属 -->
  318. <u-picker :show="showcol" :columns="columns" @cancel='showcol=!showcol' @confirm='receiveA'
  319. keyName="nickName"></u-picker>
  320. <u-loading-page :loading="viewload" iconSize="32" loadingColor="#3c9cff" fontSize="20"
  321. :loading-text="loadingtext"></u-loading-page>
  322. </view>
  323. </view>
  324. </template>
  325. <script>
  326. import {
  327. getfsuserList,
  328. getcompanyTaglist,
  329. Addblacklist,
  330. changeLable,
  331. getvipNum,
  332. changevipUser,
  333. getgroupList,
  334. becomeVipuser,
  335. becomeVipuserImg,
  336. getusersales,
  337. removebalcklist,
  338. getallTags,
  339. getprojectlist
  340. } from "@/api/manageCompany.js";
  341. import vipUserItem from "../components/vipUserItem.vue"
  342. import dropdownPanel from "../components/dropdownPanel.vue"
  343. import { mapGetters } from 'vuex';
  344. // import wx from 'weixin-js-sdk'
  345. export default {
  346. components: {
  347. vipUserItem,
  348. dropdownPanel,
  349. },
  350. data() {
  351. return {
  352. viewload: true,
  353. loadingtext: "数据加载中...",
  354. showcol: false,
  355. setImg: false,
  356. columns: [],
  357. showTagSelect: false,
  358. list: [{
  359. name: '会员(0)',
  360. }, {
  361. name: '小黑屋(0)'
  362. },
  363. {
  364. name: '黑名单(0)'
  365. }
  366. ],
  367. userList: [],
  368. current: 0,
  369. keyword: "",
  370. companytag: [],
  371. showCompanytag: [],
  372. selectedList: [], //已经选中标签列表
  373. list2: [{
  374. name: '全部',
  375. }, {
  376. name: '今日新增',
  377. }, {
  378. name: '今日完播'
  379. }, {
  380. name: '未看过课'
  381. }],
  382. currentType: 0,
  383. activeStyle: {
  384. color: '#1677ff',
  385. fontSize: '14px',
  386. fontWeight: 'bold'
  387. },
  388. inactiveStyle: {
  389. fontSize: '14px'
  390. },
  391. searchTypeIndex: 0,
  392. typeArrays: ['连续缺课天数多到少', '连续缺课天数少到多', '按注册时间晚到早', '会员姓名0-9-A-Z'],
  393. typeArray: ['按注册时间晚到早', '会员姓名0-9-A-Z'],
  394. typeoption: ['注册时间', '会员姓名'],
  395. array: [{
  396. value: '0',
  397. name: '关联搜索',
  398. },
  399. {
  400. value: '1',
  401. name: '精准搜索'
  402. }
  403. ],
  404. typeIndex: 0,
  405. popTitle: '搜索选择',
  406. showPop: false,
  407. filterData: [{
  408. name: '销售',
  409. value: 0,
  410. type: 'userStatus',
  411. option: [{
  412. label: '全部',
  413. id: ''
  414. }, ]
  415. },
  416. {
  417. name: '注册',
  418. value: 1,
  419. type: 'registerTime',
  420. option: [{
  421. label: '全部',
  422. }, {
  423. label: '今天',
  424. }, {
  425. label: '昨天',
  426. }, {
  427. label: '近7天',
  428. }, {
  429. label: '自定义',
  430. }]
  431. }, {
  432. name: '看课',
  433. value: 2,
  434. type: 'watchStatus',
  435. option: [{
  436. label: '全部',
  437. }, {
  438. label: '未看过课',
  439. }, {
  440. label: '正常看课',
  441. }, {
  442. label: '停止看课',
  443. }]
  444. },
  445. {
  446. name: '缺课',
  447. value: 3,
  448. type: 'courseStatus',
  449. option: [{
  450. label: '全部',
  451. }, {
  452. label: '已缺课',
  453. }, {
  454. label: '未缺课',
  455. }]
  456. },
  457. {
  458. name: '项目',
  459. value: 4,
  460. type: 'project',
  461. option: [{
  462. label: '全部',
  463. id: ''
  464. }]
  465. },
  466. {
  467. name: '批量',
  468. value: 5,
  469. type: 'piliang',
  470. special: true,
  471. stopPrevent: true
  472. }
  473. ],
  474. searchbarNav: 0,
  475. userStatusIndex: 0,
  476. registerTimeIndex: 0,
  477. watchStatusIndex: 0,
  478. courseStatusIndex: 0,
  479. projectStatusIndex: 0,
  480. selprojectId: '',
  481. showCalendar: false,
  482. date: '',
  483. mode: 'range',
  484. queryParam: {
  485. typeIndex: 0,
  486. startTime: '',
  487. endTime: ''
  488. },
  489. mescroll: null,
  490. downOption: {
  491. use: true,
  492. auto: false
  493. },
  494. upOption: {
  495. onScroll: false,
  496. use: true, // 是否启用上拉加载; 默认true
  497. auto: true,
  498. page: {
  499. pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  500. size: 10 // 每页数据的数量,默认10
  501. },
  502. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  503. textNoMore: "已经到底了",
  504. empty: {
  505. icon: 'https://kntobs.jnmyunl.com/shop/images/no_data.png',
  506. tip: '暂无数据'
  507. }
  508. },
  509. dataList: [],
  510. invitePop: false,
  511. setTimeShow: false,
  512. time: "",
  513. user: {},
  514. idx: [],
  515. todayday: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
  516. startTime: '',
  517. endTime: '',
  518. isShowSelectAll: false, //是否显示全选
  519. isSelectAll: false, //是否全选
  520. ispopshow: false,
  521. selectidAll: [],
  522. changetag: [],
  523. selectidtag: '',
  524. itemname: '',
  525. userid: '',
  526. groupid: [],
  527. pageOptions: {
  528. pageNum: 1,
  529. pageSize: 8,
  530. },
  531. status: 'loadmore',
  532. sharetag: 1,
  533. sharetaglist: [],
  534. codeLink: [],
  535. zhanshitag: '',
  536. copyLinks: '',
  537. showzhidao: false,
  538. currentIsBlack: 1,
  539. tagpageNum: 1,
  540. tagpageSize: 16,
  541. triggereds: false,
  542. statusA: 'loadmore',
  543. isEnableds: true,
  544. pagetag: [],
  545. tagkeywords: '',
  546. salesid: '',
  547. tagchangekeywords: '',
  548. tagpageNums: 1,
  549. tagpageSizes: 16,
  550. triggeredsA: false,
  551. statusAs: 'loadmore',
  552. isEnabledsA: true,
  553. pagetagA: [],
  554. tops: '464rpx',
  555. showInvite: false,
  556. vipInviteshow: false,
  557. projectbox:false,
  558. projectList:{},
  559. projectId:''
  560. }
  561. },
  562. // onLoad() {
  563. // // #ifdef MP-WEIXIN
  564. // uni.showShareMenu({
  565. // withShareTicket: true,
  566. // menus: ['shareAppMessage']
  567. // });
  568. // // #endif
  569. // },
  570. mounted() {
  571. this.getsalelist()
  572. this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {},
  573. this.getvipListnum()
  574. this.userList = []
  575. this.getfsuserListdata()
  576. this.getprojectlistsA()
  577. },
  578. onShow() {
  579. // #ifdef H5
  580. this.getjssdklist()
  581. // #endif
  582. },
  583. // 这个是分享聊天
  584. // onShareAppMessage() {
  585. // return {
  586. // title:this.$store.state.logoname+'小程序的'+this.user.userName + '邀请您成为会员!',
  587. // path: '/pages/user/users/becomeVIP?companyId=' +
  588. // this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
  589. // imageUrl: this.logoimg,
  590. // }
  591. // },
  592. computed: {
  593. selectedCount() {
  594. return this.userList.filter(item => item.checked).length;
  595. },
  596. imgPath() {
  597. return this.$store.state.imgpath
  598. },
  599. ...mapGetters(['logoimg']),
  600. },
  601. watch: {
  602. logoimg: {
  603. immediate: true, // 页面一进入就检查一次
  604. handler(val) {
  605. return val
  606. }
  607. },
  608. },
  609. methods: {
  610. submitPro() {
  611. if (this.projectId == '') {
  612. uni.showToast({
  613. title: '请选择项目',
  614. icon: 'none',
  615. duration: 1000
  616. });
  617. return
  618. }
  619. this.projectbox = false
  620. this.invitePop = true
  621. const pages = '/pages_course/becomeVIP?companyId=' +this.user.companyId
  622. +"&projectId=" +this.projectId+ '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  623. this.$emit('childEvent', pages);
  624. },
  625. selproject(item) {
  626. this.projectId = item.dictValue
  627. },
  628. getprojectlistsA() {
  629. const oldlist = this.filterData[4].option
  630. const data = {
  631. key: 'sys_course_project'
  632. }
  633. getprojectlist(data).then(res => {
  634. if (res.code == 200) {
  635. const list = res.data
  636. this.filterData[4].option = oldlist.concat(list.map(item => {
  637. return {
  638. id: item.dictValue,
  639. label: item.dictLabel
  640. };
  641. }));
  642. console.log('1212121212', this.filterData[4].option)
  643. } else {
  644. uni.showToast({
  645. title: res.msg,
  646. icon: 'none',
  647. });
  648. }
  649. })
  650. },
  651. getprojectlists() {
  652. const data = {
  653. key: 'sys_course_project'
  654. }
  655. getprojectlist(data).then(res => {
  656. // this.projectList=res.data
  657. this.projectList = res.data.map(item => {
  658. return {
  659. ...item,
  660. checked: false,
  661. }
  662. })
  663. console.log(this.projectList)
  664. })
  665. },
  666. sharecard() {
  667. console.log(11)
  668. },
  669. changetagall() {
  670. this.showTagSelect = !this.showTagSelect
  671. this.tagchangekeywords = ''
  672. this.selectidtag = ''
  673. this.showInvite = false
  674. this.sharetag = 1
  675. this.getalltagtaglist()
  676. },
  677. getTagpageS(type) {
  678. if (type == 'last') {
  679. if (this.tagpageNums >= 2) {
  680. this.tagpageNums--
  681. this.getalltagtaglist()
  682. } else {
  683. uni.showToast({
  684. title: '已经是第一页',
  685. icon: 'none',
  686. duration: 1000
  687. });
  688. }
  689. } else {
  690. if (this.tagpageNums < this.pagetagA.pages) {
  691. this.tagpageNums++
  692. this.getalltagtaglist()
  693. } else {
  694. uni.showToast({
  695. title: '已经是最后一页',
  696. icon: 'none',
  697. duration: 1000
  698. });
  699. }
  700. }
  701. },
  702. getcompanyTags(value) {
  703. this.tagchangekeywords = value
  704. this.getalltagtaglist()
  705. },
  706. singleDelete(data) {
  707. this.pageOptions.pageNum = 1
  708. this.$emit('update:parentValue', '新值');
  709. this.userList = []
  710. this.selectidAll[0] = data
  711. this.changeblack()
  712. },
  713. changeblack() {
  714. // console.log(this.selectidAll[0])
  715. //取消禁用
  716. if (this.selectidAll.length < 1) {
  717. uni.showToast({
  718. icon: 'none',
  719. title: '所选列表为空'
  720. })
  721. return
  722. }
  723. removebalcklist(this.selectidAll).then(res => {
  724. if (res.code == 200) {
  725. this.pageOptions.pageNum = 1
  726. // console.log(this.pageOptions.pageNum)
  727. this.getfsuserListdata('refresh')
  728. // 创建一个在**秒后执行的定时器
  729. const timer = setTimeout(function() {
  730. uni.showToast({
  731. icon: 'none',
  732. title: '取消禁用成功'
  733. })
  734. }, 200);
  735. this.getvipListnum()
  736. this.isShowSelectAll = false
  737. this.isSelectAll = false
  738. } else {
  739. uni.showToast({
  740. icon: 'none',
  741. title: res.msg
  742. })
  743. }
  744. })
  745. },
  746. blackSel() {
  747. this.isShowSelectAll = !this.isShowSelectAll
  748. // if (data.value == 4) {
  749. // this.itemname = data.name
  750. // this.isShowSelectAll = !this.isShowSelectAll
  751. // } else {
  752. // this.isShowSelectAll = false
  753. // }
  754. },
  755. getsalelist() {
  756. const oldlist = this.filterData[0].option
  757. getusersales().then(res => {
  758. if (res.code == 200) {
  759. const list = res.data
  760. this.filterData[0].option = oldlist.concat(list.map(item => {
  761. return {
  762. id: item.userId,
  763. label: item.nickName
  764. };
  765. }));
  766. // this.filterData[0].option=list.map(item => {
  767. // return {
  768. // id: item.userId,
  769. // label: item.nickName
  770. // };
  771. // })
  772. } else {
  773. uni.showToast({
  774. title: res.msg,
  775. icon: 'none',
  776. });
  777. }
  778. })
  779. },
  780. getTagpage(type) {
  781. if (type == 'last') {
  782. if (this.tagpageNum >= 2) {
  783. this.tagpageNum--
  784. this.getcompanyTag()
  785. } else {
  786. uni.showToast({
  787. title: '已经是第一页',
  788. icon: 'none',
  789. duration: 1000
  790. });
  791. }
  792. } else {
  793. if (this.tagpageNum < this.pagetag.pages) {
  794. this.tagpageNum++
  795. this.getcompanyTag()
  796. } else {
  797. uni.showToast({
  798. title: '已经是最后一页',
  799. icon: 'none',
  800. duration: 1000
  801. });
  802. }
  803. }
  804. },
  805. //标签展示下拉
  806. pullDownRefreshs() {
  807. // 下拉
  808. this.triggereds = true; //下拉了状态为true
  809. setTimeout(() => {
  810. this.triggereds = false;
  811. uni.stopPullDownRefresh()
  812. this.tagpageNum = 1;
  813. this.getcompanyTag('refresh') //触底 不穿执行else
  814. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  815. // 请求接口
  816. }, 1000)
  817. },
  818. getjssdklist() {
  819. const param = {
  820. url: window.location.href
  821. }
  822. getSDK(param).then(res => {
  823. wx.config({
  824. appId: res.data.appId, // 必填,公众号的唯一标识
  825. timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  826. nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  827. signature: res.data.signature, // 必填,签名
  828. jsApiList: ["updateAppMessageShareData"] // 必填,需要使用的JS接口列表
  829. });
  830. })
  831. },
  832. shareimg() {
  833. //分享好友
  834. this.getlink()
  835. let self = this
  836. // 配置--你到时候把配置全局 --就是这些东西 调接口拿
  837. wx.ready(function() { //需在用户可能点击分享按钮前就先调用
  838. wx.updateAppMessageShareData({
  839. title: self.user.userName + "邀请您成为会员", // 分享标题
  840. desc: self.user.deptName, // 分享描述
  841. link: self.copyLinks,
  842. imgUrl: self.codeLink.url || self.logoimg, // 分享图标
  843. success: function(res) {
  844. self.showzhidao = true
  845. self.setImg = false
  846. self.showShare = false
  847. // 设置成功
  848. uni.showToast({
  849. title: '卡片已生成',
  850. icon: 'none',
  851. duration: 1000
  852. });
  853. },
  854. fail: function(err) {
  855. console.log(err);
  856. uni.showToast({
  857. title: '卡片生成失败,请重试',
  858. icon: 'none',
  859. duration: 2000
  860. })
  861. }
  862. })
  863. });
  864. },
  865. downimg() {},
  866. closeimg() {
  867. this.setImg = false
  868. this.invitePop = false
  869. },
  870. buildimg() {
  871. this.setImg = !this.setImg
  872. this.getshareimg()
  873. },
  874. addtag(add) {
  875. this.sharetag = add
  876. this.showTagSelect = !this.showTagSelect
  877. this.invitePop = !this.invitePop
  878. this.showInvite = true
  879. this.getalltagtaglist()
  880. },
  881. changevipuser() {
  882. this.showcol = !this.showcol
  883. this.getgrouplist()
  884. },
  885. getgrouplist() {
  886. //获取群管列表
  887. getgroupList().then(res => {
  888. if (res.code == 200) {
  889. this.columns = [res.data]
  890. // console.log(this.columns)
  891. } else {
  892. uni.showToast({
  893. icon: 'none',
  894. title: res.msg
  895. })
  896. }
  897. })
  898. },
  899. changeall() {
  900. //更换全部会员
  901. console.log(1)
  902. const param = {
  903. companyId: this.user.companyId,
  904. companyUserId: this.userid,
  905. userId: this.groupid
  906. }
  907. changevipUser(param).then(res => {
  908. if (res.code == 200) {
  909. uni.showToast({
  910. icon: 'none',
  911. title: '更换会员归属成功'
  912. })
  913. } else {
  914. uni.showToast({
  915. icon: 'none',
  916. title: res.msg
  917. })
  918. }
  919. })
  920. },
  921. receiveA(e) {
  922. console.log(e)
  923. this.userid = e.value[0].userId
  924. if (this.isShowSelectAll == true) {
  925. this.groupid = this.selectidAll
  926. this.changeall()
  927. this.showcol = !this.showcol
  928. setTimeout(() => {
  929. this.getfsuserListdata()
  930. }, 200)
  931. } else {
  932. this.changeall()
  933. this.showcol = !this.showcol
  934. this.getfsuserListdata()
  935. }
  936. this.isSelectAll = false
  937. },
  938. getvipListnum() {
  939. getvipNum().then(res => {
  940. if (res.code == 200) {
  941. this.list[0].name = "会员" + '(' + res.data.number + ')'
  942. this.list[1].name = "小黑屋" + '(' + res.data.smallBlackNum + ')'
  943. this.list[2].name = "黑名单" + '(' + res.data.blackNum + ')'
  944. } else {
  945. uni.showToast({
  946. icon: 'none',
  947. title: res.msg
  948. })
  949. }
  950. })
  951. },
  952. getactNav(data) {
  953. if (data.value == 5) {
  954. this.itemname = data.name
  955. this.isShowSelectAll = !this.isShowSelectAll
  956. } else {
  957. this.isShowSelectAll = false
  958. }
  959. },
  960. closetagselect() {
  961. this.showTagSelect = !this.showTagSelect
  962. },
  963. suretagchangeAll() {
  964. if (this.sharetag == 0) {
  965. this.sharetaglist = this.changetag.filter(item => item.checked).map(v => v.tagId).join(',')
  966. this.showTagSelect = !this.showTagSelect
  967. this.zhanshitag = this.changetag.filter(item => item.checked).map(v => v.tag).join(',')
  968. // console.log(this.sharetaglist)
  969. const pages = '/pages_course/becomeVIP?companyId=' +this.user.companyId
  970. +"&projectId=" +this.projectId+ '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  971. this.$emit('childEvent', pages);
  972. console.log(pages)
  973. } else {
  974. //多选改标签确认按钮
  975. this.showTagSelect = !this.showTagSelect
  976. if (this.selectidAll.length == 0) {
  977. uni.showToast({
  978. icon: 'none',
  979. title: '未选中用户'
  980. })
  981. return
  982. }
  983. this.selectidtag = this.changetag.filter(item => item.checked).map(v => v.tagId)
  984. this.changeLabelmore()
  985. }
  986. if (this.showInvite) {
  987. this.invitePop = true
  988. }
  989. },
  990. singleChangeLable(data) {
  991. this.showTagSelect = !this.showTagSelect
  992. this.selectidAll[0] = data
  993. this.tagchangekeywords = ''
  994. this.selectidtag = []
  995. this.sharetag = 1
  996. this.showInvite = false
  997. this.getalltagtaglist()
  998. },
  999. getalltagtaglist(type) {
  1000. //获取公司标签列表
  1001. const data = {
  1002. pageNum: this.tagpageNums,
  1003. pageSize: this.tagpageSizes,
  1004. keyword: this.tagchangekeywords
  1005. }
  1006. getallTags(data).then(res => {
  1007. if (res.code == 200) {
  1008. const dataList = res.data.list.map(item => {
  1009. return {
  1010. ...item,
  1011. checked: false,
  1012. }
  1013. })
  1014. if (type == 'refresh') {
  1015. this.changetag = dataList
  1016. } else {
  1017. this.changetag = dataList
  1018. }
  1019. if (res.data.isLastPage) {
  1020. this.statusAs = 'nomore'
  1021. } else {
  1022. this.statusAs = 'loadmore'
  1023. }
  1024. this.pagetagA = res.data
  1025. } else {
  1026. uni.showToast({
  1027. icon: 'none',
  1028. title: res.msg
  1029. })
  1030. }
  1031. })
  1032. },
  1033. changesinglevip(data) {
  1034. this.showcol = !this.showcol
  1035. // console.log(data)
  1036. this.groupid[0] = data
  1037. this.getgrouplist()
  1038. },
  1039. changeLabelmore() {
  1040. //改标签选择按钮
  1041. const params = {
  1042. tagIds: this.selectidtag,
  1043. userCompanyUserIds: this.selectidAll
  1044. }
  1045. changeLable(params).then(res => {
  1046. if (res.code == 200) {
  1047. this.userList = []
  1048. this.getfsuserListdata('refresh')
  1049. const timer = setTimeout(function() {
  1050. uni.showToast({
  1051. icon: 'none',
  1052. title: '标签更改成功'
  1053. })
  1054. }, 500);
  1055. this.isSelectAll = false
  1056. this.selectedCount = 0
  1057. } else {
  1058. uni.showToast({
  1059. icon: 'none',
  1060. title: res.msg
  1061. })
  1062. }
  1063. })
  1064. },
  1065. changeOwnership() {
  1066. //更换归属(经销商功能)
  1067. },
  1068. getcompanyTag(type) {
  1069. this.companytag = []
  1070. this.tagkeywords = this.tagkeywords.replace(/,/g, ',')
  1071. const data = {
  1072. pageNum: this.tagpageNum,
  1073. pageSize: this.tagpageSize,
  1074. keyword: this.tagkeywords
  1075. }
  1076. getcompanyTaglist(data).then(res => {
  1077. if (res.code == 200) {
  1078. // this.showCompanytag = res.data.list
  1079. const dataList = res.data.list.map(item => {
  1080. return {
  1081. ...item,
  1082. checked: false,
  1083. }
  1084. })
  1085. if (type == 'refresh') {
  1086. this.companytag = dataList
  1087. } else {
  1088. this.companytag = [...this.companytag, ...dataList]
  1089. }
  1090. if (res.data.isLastPage) {
  1091. this.statusA = 'nomore'
  1092. } else {
  1093. this.statusA = 'loadmore'
  1094. }
  1095. this.pagetag = res.data
  1096. } else {
  1097. uni.showToast({
  1098. icon: 'none',
  1099. title: res.msg
  1100. })
  1101. }
  1102. })
  1103. },
  1104. getfsuserListdata(type) {
  1105. // this.userList=[]
  1106. const param = {
  1107. userId: this.user.userId,
  1108. tabValue: this.currentType,
  1109. registerStartTime: this.startTime, //注册开始
  1110. registerEndTime: this.endTime, //注册结束
  1111. watchCourseType: this.watchStatusIndex,
  1112. missCourseStatus: this.courseStatusIndex,
  1113. projectId: this.selprojectId,
  1114. keyword: this.keyword,
  1115. tagIds: this.idx,
  1116. status: this.currentIsBlack,
  1117. companyUserId: this.salesid,
  1118. continueMissCourseSort: this.searchTypeIndex,
  1119. ...this.pageOptions
  1120. }
  1121. getfsuserList(param).then(res => {
  1122. if (res.code == 200) {
  1123. this.viewload = false
  1124. let dataList = res.data.list.map(item => {
  1125. return {
  1126. ...item,
  1127. checked: false,
  1128. }
  1129. })
  1130. if (type == 'refresh') {
  1131. this.userList = dataList
  1132. } else if (type == 'more') {
  1133. this.userList = dataList
  1134. } else {
  1135. this.userList = [...this.userList, ...dataList]
  1136. }
  1137. if (res.data.isLastPage) {
  1138. this.status = 'nomore'
  1139. } else {
  1140. this.status = 'loadmore'
  1141. }
  1142. } else {
  1143. uni.showToast({
  1144. icon: 'none',
  1145. title: res.msg
  1146. })
  1147. }
  1148. })
  1149. },
  1150. onChange(index) {
  1151. if (index == 5) return
  1152. this.searchbarNav = index
  1153. },
  1154. searchKeyword(value) {
  1155. this.keyword = value
  1156. this.userList = []
  1157. this.pageOptions.pageNum = 1
  1158. this.getfsuserListdata()
  1159. },
  1160. singleChange(data) {
  1161. this.userList = []
  1162. this.selectidAll[0] = data
  1163. this.changeProhibit()
  1164. },
  1165. changeProhibit() {
  1166. //批量禁用选择按钮
  1167. if (this.selectidAll.length < 1) {
  1168. uni.showToast({
  1169. icon: 'none',
  1170. title: '所选列表为空'
  1171. })
  1172. return
  1173. }
  1174. Addblacklist(this.selectidAll).then(res => {
  1175. if (res.code == 200) {
  1176. this.pageOptions.pageNum = 1
  1177. this.getfsuserListdata('refresh')
  1178. // 创建一个在**秒后执行的定时器
  1179. const timer = setTimeout(function() {
  1180. uni.showToast({
  1181. icon: 'none',
  1182. title: '禁用成功'
  1183. })
  1184. }, 200);
  1185. this.getvipListnum()
  1186. // this.isShowSelectAll = false
  1187. this.isSelectAll = false
  1188. } else {
  1189. uni.showToast({
  1190. icon: 'none',
  1191. title: res.msg
  1192. })
  1193. }
  1194. })
  1195. },
  1196. // 全选
  1197. selectAll() {
  1198. // 先设置全选
  1199. this.isSelectAll = !this.isSelectAll
  1200. // 然后设置列表 checked没得this不会报错吗 这是返回新数组
  1201. console.log(this.isSelectAll)
  1202. this.userList = this.userList.map(item => {
  1203. // 每一项的 checked为 全选的状态
  1204. return {
  1205. ...item,
  1206. checked: this.isSelectAll
  1207. }
  1208. })
  1209. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userCompanyUserId)
  1210. console.log(this.isSelectAll)
  1211. },
  1212. // 单选 /反选
  1213. changeItem(i) {
  1214. let arr = {
  1215. ...this.userList[i],
  1216. checked: !this.userList[i].checked
  1217. }
  1218. this.$set(this.userList, i, arr)
  1219. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userCompanyUserId)
  1220. console.log(this.selectidAll)
  1221. this.isSelectAll = this.userList.every(item => item.checked)
  1222. if (this.isSelectAll) {
  1223. this.userList = this.userList.map(item => {
  1224. return {
  1225. ...item,
  1226. checked: this.isSelectAll
  1227. }
  1228. })
  1229. }
  1230. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userCompanyUserId)
  1231. },
  1232. reset() {
  1233. //重置时间选择等筛选
  1234. const type = this.filterData[this.searchbarNav].type
  1235. console.log(this.registerTimeIndex)
  1236. if (type == 'registerTime') {
  1237. this.registerTimeIndex = ''
  1238. this.endTime = ''
  1239. this.startTime = ''
  1240. this.getfsuserListdata('refresh')
  1241. // console.log(this.getfsuserListdata())
  1242. } else if (type == 'watchStatus') {
  1243. this.watchStatusIndex = 0
  1244. this.getfsuserListdata('refresh')
  1245. } else if (type == 'userStatus') {
  1246. this.userStatusIndex = 0
  1247. this.salesid = ''
  1248. this.getfsuserListdata('refresh')
  1249. } else if (type == 'courseStatus') {
  1250. this.courseStatusIndex = 0
  1251. this.getfsuserListdata('refresh')
  1252. } else if (type == 'project') {
  1253. this.selprojectId = ''
  1254. this.projectStatusIndex = 0
  1255. this.getfsuserListdata("refresh")
  1256. } else {
  1257. }
  1258. },
  1259. confirm(e) {
  1260. this.pageOptions.pageNum = 1
  1261. this.userList = []
  1262. const type = this.filterData[this.searchbarNav].type
  1263. const value = this.registerTimeIndex
  1264. if (type == 'registerTime') {
  1265. if (value == 0) {
  1266. this.startTime = ''
  1267. this.endTime = ''
  1268. this.getfsuserListdata('refresh')
  1269. } else if (value == 1) {
  1270. this.startTime = this.todayday + ' 00:00:00'
  1271. this.endTime = this.todayday + ' 23:59:59'
  1272. this.getfsuserListdata('refresh')
  1273. } else if (value == 2) {
  1274. let yesterday = new Date();
  1275. yesterday.setDate(yesterday.getDate() - 1);
  1276. this.startTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 00:00:00'
  1277. this.endTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 23:59:59'
  1278. this.getfsuserListdata('refresh')
  1279. } else if (value == 3) {
  1280. let yesterday = new Date();
  1281. yesterday.setDate(yesterday.getDate() - 6);
  1282. this.startTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 00:00:00'
  1283. this.endTime = this.todayday + ' 23:59:59'
  1284. this.getfsuserListdata('refresh')
  1285. } else {
  1286. this.getfsuserListdata('refresh')
  1287. }
  1288. } else if (type == 'watchStatus') {
  1289. // this.watchStatusIndex=value
  1290. this.getfsuserListdata()
  1291. // console.log(this.filterData)
  1292. } else if (type == 'userStatus') {
  1293. if (this.userStatusIndex == 0) {
  1294. this.salesid = ''
  1295. this.getfsuserListdata('refresh')
  1296. } else {
  1297. this.getfsuserListdata('refresh')
  1298. }
  1299. // console.log(this.userStatusIndex)
  1300. } else if (type == 'courseStatus') {
  1301. this.getfsuserListdata('refresh')
  1302. console.log(this.courseStatusIndex)
  1303. } else if (type == 'project') {
  1304. if (this.projectStatusIndex == 0) {
  1305. this.selprojectId = ''
  1306. this.getfsuserListdata('refresh')
  1307. } else {
  1308. this.getfsuserListdata('refresh')
  1309. }
  1310. console.log(this.projectStatusIndex)
  1311. }
  1312. // this.mescroll.resetUpScroll()
  1313. },
  1314. handleParamItem(type, index, id) {
  1315. if (type == 'registerTime') {
  1316. this.registerTimeIndex = index
  1317. } else if (type == 'watchStatus') {
  1318. this.watchStatusIndex = index
  1319. // console.log('watchStatus',index)
  1320. } else if (type == 'userStatus') {
  1321. this.userStatusIndex = index
  1322. this.salesid = id
  1323. console.log(this.salesid)
  1324. } else if (type == 'courseStatus') {
  1325. this.courseStatusIndex = index
  1326. } else if (type == 'project') {
  1327. this.selprojectId = id
  1328. this.projectStatusIndex = index
  1329. } else {
  1330. this.ispopshow = false
  1331. }
  1332. },
  1333. sectionChange(index) {
  1334. this.current = index;
  1335. this.currentType = 0
  1336. this.startTime = '' //注册开始
  1337. this.endTime = '' //注册结束
  1338. this.watchStatusIndex = 0
  1339. this.salesid = ''
  1340. this.courseStatusIndex = 0
  1341. this.selprojectId = ''
  1342. this.keyword = ''
  1343. this.idx = []
  1344. this.pageOptions.pageNum = 1
  1345. this.isShowSelectAll = false
  1346. this.userList = []
  1347. if (index == 0) {
  1348. // 0小黑屋 1正常 2拉黑
  1349. this.currentIsBlack = 1
  1350. this.getfsuserListdata("refresh")
  1351. } else if (index == 1) {
  1352. this.currentIsBlack = 0
  1353. this.getfsuserListdata("refresh")
  1354. } else {
  1355. this.currentIsBlack = 2
  1356. this.getfsuserListdata("refresh")
  1357. }
  1358. this.isSelectAll=false
  1359. this.getvipListnum()
  1360. },
  1361. clickTypeTab(e) {
  1362. this.currentType = e.index
  1363. this.userList = []
  1364. // 在这里更新
  1365. this.pageOptions.pageNum = 1
  1366. this.getfsuserListdata()
  1367. },
  1368. bindPickerChange(e) {
  1369. console.log('picker发送选择改变,携带值为', e.detail.value)
  1370. this.userList = []
  1371. this.searchTypeIndex = e.detail.value
  1372. this.getfsuserListdata()
  1373. },
  1374. openPop(type) {
  1375. this.popTitle = type == 'search' ? '搜索选择' : type == 'tag' ? '标签筛选' : ''
  1376. this.typeIndex = this.queryParam.typeIndex
  1377. this.showPop = true
  1378. if (type == 'tag') {
  1379. this.getcompanyTag()
  1380. }
  1381. },
  1382. closePop() {
  1383. this.showPop = false
  1384. },
  1385. resetPop(i) {
  1386. this.idx = []
  1387. this.tagkeywords = ''
  1388. this.tagpageNum = 1
  1389. this.showCompanytag = []
  1390. this.companytag.forEach(tag => {
  1391. tag.checked = false; // 将所有标签的show属性重置为true
  1392. });
  1393. this.showPop = false
  1394. this.$nextTick(() => {
  1395. this.getcompanyTag()
  1396. this.getfsuserListdata()
  1397. })
  1398. },
  1399. closeCalendar() {
  1400. this.showCalendar = false
  1401. },
  1402. confirmCalendar(e) {
  1403. // this.startTime = e[0]
  1404. // this.endTime = e[e.length-1]
  1405. this.showCalendar = false
  1406. this.queryParam.startTime = e.range.after
  1407. this.queryParam.endTime = e.range.before
  1408. this.endTime = e.range.before + ' 23:59:59'
  1409. this.startTime = e.range.after + ' 00:00:00'
  1410. console.log(e)
  1411. // this.getCount()
  1412. },
  1413. bindTypeChange(i) {
  1414. this.typeIndex = i
  1415. },
  1416. confirmPop() {
  1417. this.queryParam.typeIndex = this.typeIndex
  1418. this.showPop = false
  1419. this.showCompanytag = this.companytag.filter(item => item.checked)
  1420. this.idx = this.showCompanytag.map(v => v.tagId)
  1421. //filtter(过滤) 筛选所有checked==true的 然后map返回每一项的id
  1422. if (this.idx.length == 0) {
  1423. this.showCompanytag = this.companytag
  1424. }
  1425. this.$nextTick(() => {
  1426. this.getfsuserListdata("refresh")
  1427. })
  1428. },
  1429. chooseTag(i) {
  1430. this.companytag[i].checked = !this.companytag[i].checked
  1431. },
  1432. choosechangeTag(i) {
  1433. this.changetag[i].checked = !this.changetag[i].checked
  1434. },
  1435. vipInvite() {
  1436. if (!this.vipInviteshow) {
  1437. // this.invitePop = true
  1438. // this.getlink('preload')
  1439. // this.getjssdklist()
  1440. this.getprojectlists()
  1441. // this.invitePop = true
  1442. this.projectId=''
  1443. this.projectbox=true
  1444. this.sharetaglist = null
  1445. } else {
  1446. this.vipInviteshow = false
  1447. }
  1448. },
  1449. showinimg() {
  1450. this.vipInviteshow = true
  1451. },
  1452. copyLink() {
  1453. this.setTimeShow = true
  1454. },
  1455. confirmTime() {
  1456. this.setTimeShow = false
  1457. this.showShare = false
  1458. console.log(this.showInvite)
  1459. this.getshareLink()
  1460. },
  1461. getshareimg() {
  1462. //生成海报
  1463. this.getlink()
  1464. this.codeLink = ''
  1465. uni.showLoading({
  1466. title: '正在生成中...'
  1467. })
  1468. const url = window.location.href.split('#')[0]
  1469. const param = {
  1470. companyId: this.user.companyId,
  1471. companyUserId: this.user.userId,
  1472. realLink: url + '#/pages/user/users/becomeVIP' + '?companyId=' +
  1473. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
  1474. tagIds: this.sharetaglist,
  1475. }
  1476. becomeVipuserImg(param).then(res => {
  1477. if (res.code == 200) {
  1478. this.codeLink = res.posterImage
  1479. console.log(res)
  1480. } else {
  1481. uni.showToast({
  1482. title: res.msg,
  1483. icon: 'none',
  1484. duration: 2000
  1485. });
  1486. }
  1487. })
  1488. },
  1489. getlink(type) {
  1490. //生成链接
  1491. const param = {
  1492. companyId: this.user.companyId,
  1493. companyUserId: this.user.userId,
  1494. tagids: this.sharetaglist,
  1495. limitTime: this.time
  1496. }
  1497. const url = window.location.href.split('#')[0]
  1498. // console.log(url)
  1499. this.copyLinks = url + '#/pages/user/users/becomeVIP' + '?companyId=' +
  1500. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  1501. },
  1502. getshareLink() {
  1503. //生成链接
  1504. this.copyLinks = []
  1505. const param = {
  1506. code: '',
  1507. companyId: this.user.companyId,
  1508. companyUserId: this.user.userId,
  1509. tagids: this.sharetaglist,
  1510. limitTime: this.time
  1511. }
  1512. const url = window.location.href.split('#')[0]
  1513. console.log(url)
  1514. this.copyLinks = url + '#/pages/user/users/becomeVIP' + '?companyId=' +
  1515. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  1516. console.log(this.copyLinks)
  1517. setTimeout(() => {
  1518. uni.setClipboardData({
  1519. data: String(this.copyLinks),
  1520. success: () => {
  1521. uni.showToast({
  1522. title: '复制成功',
  1523. icon: 'none',
  1524. duration: 2000
  1525. });
  1526. setTimeout(() => {
  1527. this.invitePop = false
  1528. }, 200)
  1529. },
  1530. })
  1531. }, 100)
  1532. },
  1533. mescrollInit(mescroll) {
  1534. this.mescroll = mescroll;
  1535. },
  1536. /*下拉刷新的回调 */
  1537. downCallback(mescroll) {
  1538. mescroll.resetUpScroll()
  1539. },
  1540. upCallback(page) {
  1541. //联网加载数据
  1542. var that = this;
  1543. var data = {
  1544. courseId: this.courseId,
  1545. status: '',
  1546. pageNum: page.num,
  1547. pageSize: page.size
  1548. };
  1549. uni.showLoading({
  1550. title: "加载中..."
  1551. })
  1552. },
  1553. }
  1554. }
  1555. </script>
  1556. <style lang="scss" scoped>
  1557. .probg{
  1558. color: #666;
  1559. }
  1560. .probgsel{
  1561. background-color: #1677ff;
  1562. color: #fff;
  1563. border: none;
  1564. }
  1565. .quedingpro{
  1566. background-color: #1677ff;
  1567. color: #fff;
  1568. border-radius: 80rpx;
  1569. height: 80rpx;
  1570. line-height: 80rpx;
  1571. width: 60%;
  1572. margin: 0 auto;
  1573. margin-top: 40rpx;
  1574. text-align: center;
  1575. }
  1576. .card-share {
  1577. position: relative;
  1578. }
  1579. .share {
  1580. display: inline-block;
  1581. position: absolute;
  1582. bottom: 0;
  1583. left: 0;
  1584. width: 100%;
  1585. height: 50%;
  1586. opacity: 0;
  1587. }
  1588. .imgshe {
  1589. display: flex;
  1590. flex-direction: row-reverse
  1591. }
  1592. .point-box {
  1593. height: 100%;
  1594. width: 100%;
  1595. .xu-box {
  1596. border: #f5f5f5 4rpx dashed;
  1597. padding: 20rpx 20rpx;
  1598. }
  1599. }
  1600. .codeimg {
  1601. position: absolute;
  1602. z-index: 9999;
  1603. left: 40rpx;
  1604. top: 40rpx;
  1605. }
  1606. #codeurl {
  1607. position: relative;
  1608. }
  1609. .checked-bg {
  1610. border: 1px solid #1677ff !important;
  1611. color: #1677ff !important;
  1612. background-color: #e7f1fe !important;
  1613. }
  1614. .changetagbtn {
  1615. width: 45%;
  1616. height: 80rpx;
  1617. border-radius: 50rpx;
  1618. text-align: center;
  1619. line-height: 80rpx;
  1620. }
  1621. ::v-deep {
  1622. .foot-select {
  1623. width: 100%;
  1624. padding: 20rpx 20rpx;
  1625. padding-bottom: 60rpx;
  1626. z-index: 10000 !important;
  1627. position: fixed;
  1628. bottom: 0;
  1629. margin-left: -24rpx !important;
  1630. }
  1631. }
  1632. ::v-deep {
  1633. .model .u-fade-enter-active {
  1634. z-index: 10075 !important;
  1635. }
  1636. }
  1637. ::v-deep {
  1638. .uni-calendar__mask {
  1639. z-index: 11000 !important;
  1640. }
  1641. .uni-calendar__content {
  1642. z-index: 12000 !important;
  1643. }
  1644. }
  1645. .container {
  1646. font-family: PingFang SC, PingFang SC;
  1647. font-weight: 400;
  1648. font-size: 14px;
  1649. color: #222222;
  1650. height: 100%;
  1651. overflow: hidden;
  1652. }
  1653. .boxnav {
  1654. flex-wrap: wrap;
  1655. padding: 0 0 0 10px;
  1656. &-item {
  1657. width: 50%;
  1658. overflow: hidden;
  1659. }
  1660. &-item-info {
  1661. border: 1px solid #f5f5f5;
  1662. text-align: center;
  1663. color: #222;
  1664. background-color: #f5f5f5;
  1665. border-radius: 3px;
  1666. padding: 5px;
  1667. margin: 0 10px 10px 0;
  1668. }
  1669. &-active {
  1670. border: 1px solid #1677ff !important;
  1671. color: #1677ff !important;
  1672. background-color: #e7f1fe !important;
  1673. }
  1674. }
  1675. .calendar-day {
  1676. font-family: PingFang SC, PingFang SC;
  1677. font-weight: 400;
  1678. font-size: 12px;
  1679. color: #999;
  1680. flex: 1;
  1681. min-height: 30px;
  1682. background-color: #f5f5f5;
  1683. border-radius: 4px;
  1684. margin: 0 10px 10px 0;
  1685. }
  1686. .setTimebox {
  1687. font-family: PingFang SC, PingFang SC;
  1688. font-weight: 400;
  1689. font-size: 14px;
  1690. width: fit-content;
  1691. height: fit-content;
  1692. }
  1693. .timetip {
  1694. font-family: PingFang SC, PingFang SC;
  1695. font-weight: 400;
  1696. font-size: 14px;
  1697. color: #2979ff;
  1698. text-align: center;
  1699. margin-bottom: 5px;
  1700. }
  1701. .popbox {
  1702. background-color: #fff;
  1703. border-radius: 12px;
  1704. font-family: PingFang SC, PingFang SC;
  1705. font-weight: 400;
  1706. font-size: 14px;
  1707. color: #333;
  1708. padding-bottom: 120rpx;
  1709. &-head {
  1710. padding: 15px;
  1711. font-weight: bold;
  1712. font-size: 15px;
  1713. text-align: center;
  1714. position: relative;
  1715. }
  1716. .close-circle {
  1717. position: absolute;
  1718. right: 10px;
  1719. top: 50%;
  1720. transform: translateY(-50%);
  1721. }
  1722. &-body {
  1723. padding: 10px 10px;
  1724. }
  1725. .radiobox {
  1726. &-item {
  1727. padding: 10px 0;
  1728. border-bottom: 1px solid #f5f5f5;
  1729. &:last-child {
  1730. border-bottom: none;
  1731. }
  1732. }
  1733. }
  1734. &-footer {
  1735. padding: 15px 0;
  1736. }
  1737. &-footer-btn {
  1738. flex: 1;
  1739. height: 44px;
  1740. line-height: 44px;
  1741. margin: 0 10px;
  1742. border-radius: 50px;
  1743. border: none;
  1744. font-family: PingFang SC, PingFang SC;
  1745. font-weight: 400;
  1746. font-size: 14px;
  1747. color: #333;
  1748. &::after {
  1749. border: none;
  1750. }
  1751. }
  1752. .con-btn {
  1753. background-color: #1677ff;
  1754. color: #fff;
  1755. }
  1756. .choosetitle {
  1757. font-family: PingFang SC, PingFang SC;
  1758. font-weight: 400;
  1759. font-size: 15px;
  1760. color: #333;
  1761. }
  1762. .invitetip {
  1763. margin-top: 10px;
  1764. background-color: #ebf5fb;
  1765. color: #1677ff;
  1766. padding: 5px 10px;
  1767. border-radius: 5px;
  1768. }
  1769. .sharePop-item {
  1770. padding: 0 10px;
  1771. box-sizing: border-box;
  1772. font-family: PingFang SC, PingFang SC;
  1773. font-weight: 400;
  1774. font-size: 14px;
  1775. display: inline-flex !important;
  1776. image {
  1777. height: 48px;
  1778. width: 48px;
  1779. margin-bottom: 10px;
  1780. }
  1781. }
  1782. }
  1783. .headbox {
  1784. background-color: #fff;
  1785. .subsection {
  1786. height: 45px;
  1787. padding: 4px;
  1788. }
  1789. .participate-order {
  1790. font-size: 12px;
  1791. image {
  1792. width: 15px;
  1793. height: 15px;
  1794. }
  1795. }
  1796. }
  1797. .tag-active {
  1798. background-color: #ffeceb !important;
  1799. color: #f93e3e !important;
  1800. border: 1px solid #f93e3e !important;
  1801. }
  1802. .tagbox {
  1803. padding-top: 10rpx;
  1804. font-size: 12px;
  1805. color: #1677ff;
  1806. &-list {
  1807. margin: 0 0 -6px 6px;
  1808. flex-wrap: wrap;
  1809. }
  1810. &-item {
  1811. height: 26px;
  1812. padding: 0 8px;
  1813. margin: 0 6px 6px 0;
  1814. border-radius: 4px;
  1815. background-color: #f5f5f5;
  1816. color: #999;
  1817. border: 1px solid #f5f5f5;
  1818. box-sizing: border-box;
  1819. font-size: 12px;
  1820. }
  1821. }
  1822. .invite-member {
  1823. height: 55px;
  1824. width: 50px;
  1825. position: fixed;
  1826. bottom: 110px;
  1827. right: 10px;
  1828. cursor: pointer;
  1829. .intimg {
  1830. width: 50px;
  1831. height: 55px;
  1832. }
  1833. }
  1834. .invite-members {
  1835. right: -68rpx;
  1836. }
  1837. .falseimg {
  1838. position: absolute;
  1839. width: 30rpx;
  1840. height: 30rpx;
  1841. top: 0rpx;
  1842. right: -8rpx;
  1843. }
  1844. .userlist {
  1845. padding: 24rpx;
  1846. }
  1847. </style>