index.vue 54 KB

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