memberIndex.vue 53 KB

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