AI销管
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Userinsightinto.vue 13 KiB

há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
há 2 anos
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. <template>
  2. <view class="box">
  3. <view class="boxtittab">
  4. <view class="tabbox">
  5. <view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">今日</view>
  6. </view>
  7. <view class="tabbox">
  8. <view :class="{ activecllasscet: activeTotal == 1 }" @click="tabtimetap(1)">昨日</view>
  9. </view>
  10. <view class="tabbox">
  11. <view :class="{ activecllasscet: activeTotal == 2 }" @click="tabtimetap(2)">近一周</view>
  12. </view>
  13. <view class="tabbox">
  14. <view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view>
  15. </view>
  16. </view>
  17. <view class="info">
  18. <view class="item" @click="goTo(1)">
  19. <text class="num">{{efficient||0}}</text>
  20. <text class="tit">有效接待</text>
  21. </view>
  22. <view class="item" @click="goTo(2)">
  23. <text class="num">{{markCount||0}}</text>
  24. <text class="tit">已标顾问</text>
  25. </view>
  26. <view class="item" @click="goTo(3)">
  27. <text class="num">{{noMarkCount||0}}</text>
  28. <text class="tit">未标顾问</text>
  29. </view>
  30. </view>
  31. <view class="boxzonglan">
  32. <view class="zonglantit">客群特征总览</view>
  33. <view class="zonglanbox">
  34. <view class="grid" v-for="(item,index) in numlist" :key="index" v-if="item.isshow">
  35. <view class="audonum">
  36. <view class="circle"></view>
  37. {{item.name}}&nbsp;&nbsp;{{index!=0?'触达次数':''}}</view>
  38. <view class="num">{{item.num}}</view>
  39. </view>
  40. </view>
  41. <view v-if="Afolding==true" class="anclack" @click="anclick(1)">展开 <u-icon style="margin-left: 8rpx;" label-color='#666666' name="arrow-down"></u-icon></view>
  42. <view v-if="Afolding==false" class="anclack" @click="anclick(2)">收起 <u-icon style="margin-left: 8rpx;" label-color='#666666' name="arrow-up"></u-icon></view>
  43. </view>
  44. <view class="centerfor" v-for="(item,index) in objlist" :key="index">
  45. <view class="fortit">
  46. <view class="left">
  47. <view class="lefti"></view>
  48. <view class="lefttext">{{item.name}}触达排名</view>
  49. </view>
  50. <view class="right">
  51. <view :class="{ activeclass: item.activeTab == 0 }" @click="charttoswitch(index,0)">表格</view>
  52. <view style="margin-left: 16rpx;" :class="{ activeclass: item.activeTab == 1 }"
  53. @click="charttoswitch(index,1)">饼状图</view>
  54. </view>
  55. </view>
  56. <view v-if="item.activeTab==0" class="tabdada">
  57. <view class="tabth">
  58. <view>排名</view>
  59. <view>画像语意词/触达客户</view>
  60. <view>触达占比</view>
  61. <view>沟通记录</view>
  62. </view>
  63. <view v-if="item.total==0" style="color: #666;font-size:28rpx;width: 100%;height: 500rpx;line-height: 500rpx;text-align: center;" >暂无数据</view>
  64. <view class="tabtd" v-if="item.total" v-for="(chend,i) in item.matchKeywords" :key="i">
  65. <view>
  66. <image v-if="i==0" class="ranking" src="../../../static/images/top1.png" mode=""></image>
  67. <image v-else-if="i==1" class="ranking" src="../../../static/images/top2.png" mode=""></image>
  68. <image v-else-if="i==2" class="ranking" src="../../../static/images/top3.png" mode=""></image>
  69. <view class="ranking1" v-else>{{i+1}}</view>
  70. </view>
  71. <view>{{chend.name}}({{chend.total}})</view>
  72. <view>{{chend.proportion}}%</view>
  73. <view @click="Toview(item,i)">查看</view>
  74. </view>
  75. </view>
  76. <view v-if="item.activeTab==1" class="tabech">
  77. <template v-if="item.chartDataShow">
  78. <qiun-data-charts
  79. :key="item.id"
  80. type="ring"
  81. :chartData="item.chartData"
  82. :canvas2d="true"
  83. :canvasId="'wangxiaohuahahahahaha'+item.id"
  84. :opts='item.opts'
  85. background="none" />
  86. </template>
  87. <template v-else>
  88. <view>
  89. <view style="color: #666;font-size:28rpx;width: 100%;height: 500rpx;line-height: 500rpx;text-align: center;" >暂无数据</view>
  90. </view>
  91. </template>
  92. </view>
  93. </view>
  94. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  95. <u-back-top :scroll-top="scrollTop"></u-back-top>
  96. </view>
  97. </template>
  98. <script>
  99. var app = getApp();
  100. var util = require("../../../utils/util.js");
  101. var config = require("../../../config");
  102. export default {
  103. data() {
  104. return {
  105. scrollTop: 0,
  106. activeTotal: 2,
  107. timeobj:{
  108. statDateStart:'',
  109. statDateEnd:''
  110. },
  111. buildingID:'',
  112. totalTimeShow: false,
  113. activeTab: 0,
  114. numlist:[],
  115. objlist:[],
  116. Afolding:true,
  117. efficient:"",
  118. markCount:"",
  119. noMarkCount:""
  120. };
  121. },
  122. onPageScroll(e) {
  123. this.scrollTop = e.scrollTop;
  124. },
  125. onLoad() {
  126. this.buildingID=uni.getStorageSync('buildingID').id;
  127. this.gitinit()
  128. },
  129. onPullDownRefresh(){
  130. this.gitinit()
  131. setTimeout(function () {
  132. uni.stopPullDownRefresh();
  133. }, 1000);
  134. },
  135. methods: {
  136. goTo(i){
  137. if(i==1){
  138. uni.navigateTo({
  139. url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+this.activeTotal+'&validInvalid=0'+'&staTime='+this.timeobj.statDateStart+'&endtime='+this.timeobj.statDateEnd
  140. });
  141. }else if(i==2){
  142. uni.navigateTo({
  143. url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+this.activeTotal+'&markAdvisor=1&validInvalid=0'+'&staTime='+this.timeobj.statDateStart+'&endtime='+this.timeobj.statDateEnd
  144. });
  145. }else{
  146. uni.navigateTo({
  147. url: '/pages/center/records/index?refresh='+'refresh'+'&activeTotal='+this.activeTotal+'&markAdvisor=0&validInvalid=0'+'&staTime='+this.timeobj.statDateStart+'&endtime='+this.timeobj.statDateEnd
  148. });
  149. }
  150. },
  151. anclick(i){
  152. console.log(i)
  153. this.Afolding=!this.Afolding;
  154. this.numlist.forEach((citem,index)=>{
  155. if(index<6){
  156. citem.isshow=true;
  157. }else{
  158. citem.isshow=!citem.isshow;
  159. }
  160. })
  161. this.$forceUpdate()
  162. },
  163. //获取数据
  164. gitinit(){
  165. this.objlist=[];
  166. this.numlist=[];
  167. var dateType='';
  168. if(this.activeTotal==3){
  169. dateType=null;
  170. }else{
  171. dateType=this.activeTotal;
  172. }
  173. let parames={
  174. dateType:dateType,
  175. statDateStart:this.timeobj.statDateStart,
  176. statDateEnd:this.timeobj.statDateEnd,
  177. houseId:this.buildingID
  178. }
  179. this.$u.post("/matchKeywords/findmatchdata", parames).then(data => {
  180. this.numlist.push({
  181. name:"有效接待",
  182. num:data.total
  183. })
  184. data.list.forEach((item,index)=>{
  185. this.numlist.push({
  186. name:item.name,
  187. num:item.total
  188. })
  189. this.efficient = data.total
  190. this.markCount = data.markCount
  191. this.noMarkCount = data.noMarkCount
  192. item.activeTab=0;
  193. item.opts={
  194. "title": {
  195. "name": item.total,
  196. "color": '#666666',
  197. "fontSize": 20
  198. },
  199. "subtitle": {
  200. "name": '总触达次数',
  201. "color": '#32363D',
  202. "fontSize": 12,
  203. "offsetY": 4
  204. }
  205. }
  206. item.chartData={
  207. "categories": [],
  208. "series": [{
  209. "data": []
  210. }],
  211. };
  212. item.matchKeywords.forEach(chend=>{
  213. item.chartData.series[0].data.push({
  214. "name":chend.name,
  215. "value": chend.proportion
  216. })
  217. })
  218. if (item.chartData.series[0].data.length > 0) {
  219. item.chartDataShow = true
  220. } else {
  221. item.chartDataShow = false
  222. }
  223. })
  224. data.list.forEach(item=>{
  225. item.matchKeywords.forEach(chend=>{
  226. if(chend.isInterval==0){
  227. chend.name=chend.name+chend.unit+'-'+chend.endName+chend.unit
  228. }else{
  229. chend.name=chend.name
  230. }
  231. })
  232. })
  233. this.objlist=data.list;
  234. this.Afolding=true;
  235. this.numlist.forEach((citem,index)=>{
  236. if(index<6){
  237. citem.isshow=true
  238. }else{
  239. citem.isshow=false
  240. }
  241. })
  242. })
  243. },
  244. //查看
  245. Toview(item,i){
  246. uni.navigateTo({
  247. url: '/pages/center/Piabodata/Customerportrait/Receivingrecords?datatype='+this.activeTotal+"&keywordsId="+item.matchKeywords[i].keywordsId+"&starttime="+this.timeobj.statDateStart+"&endoftime="+this.timeobj.statDateEnd
  248. })
  249. },
  250. //时间切换
  251. tabtimetap(index) {
  252. this.activeTotal = index;
  253. if (index == 3) {
  254. this.totalTimeShow = true;
  255. } else {
  256. this.gitinit()
  257. }
  258. },
  259. //自定义时间
  260. totalTimeChange(e) {
  261. this.timeobj.statDateStart = e.startDate;
  262. this.timeobj.statDateEnd = e.endDate;
  263. this.activeTotal=3;
  264. this.gitinit()
  265. },
  266. charttoswitch(index,num) {
  267. this.objlist[index].activeTab=num
  268. }
  269. }
  270. };
  271. </script>
  272. <style lang="scss" scoped>
  273. .info{
  274. display: flex;
  275. justify-content: space-between;
  276. background: #fff;
  277. padding: 10px 20px;
  278. .item{
  279. display: flex;
  280. flex-direction: column;
  281. justify-content: center;
  282. align-items: center;
  283. text{
  284. font-size: 32rpx;
  285. }
  286. .num{
  287. font-weight: bold;
  288. }
  289. .tit{
  290. margin-top: 20rpx;
  291. }
  292. }
  293. }
  294. .anclack{
  295. width: 100%;
  296. height: 78rpx;
  297. text-align: center;
  298. line-height: 78rpx;
  299. font-size: 30rpx;
  300. // border: 1rpx solid #E0E0E0;
  301. font-weight: 400;
  302. color: #666666;
  303. }
  304. .box {
  305. width: 100%;
  306. height: 100%;
  307. background: #FAFAFA;
  308. padding-bottom: 60rpx;
  309. }
  310. .boxtittab {
  311. position: sticky;
  312. top: var(--window-top);
  313. z-index: 999;
  314. width: 100;
  315. height: 92rpx;
  316. background: #FFFFFF;
  317. border: 1px solid #E0E0E0;
  318. display: flex;
  319. align-items: center;
  320. .tabbox {
  321. flex: 1;
  322. height: 100%;
  323. text-align: center;
  324. line-height: 92rpx;
  325. color: #666666;
  326. font-size: 28rpx;
  327. display: flex;
  328. justify-content: center;
  329. .activecllasscet {
  330. width: 96rpx;
  331. color: #2671E2;
  332. border-bottom: 4rpx solid #2671E2;
  333. }
  334. }
  335. }
  336. .tabtime {
  337. width: 100%;
  338. height: 50rpx;
  339. text-align: center;
  340. line-height: 50rpx;
  341. font-size: 24rpx;
  342. color: #666666;
  343. }
  344. .boxzonglan {
  345. margin-top: 20rpx;
  346. border-radius: 12rpx;
  347. width: 100%;
  348. min-height: 496rpx;
  349. background: #FFFFFF;
  350. padding: 30rpx 30rpx 30rpx 30rpx;
  351. .zonglantit {
  352. font-size: 30rpx;
  353. color: #333333;
  354. font-family: PingFangSC-Semibold, PingFang SC;
  355. font-weight: 600;
  356. }
  357. .zonglanbox {
  358. width: 100%;
  359. display: flex;
  360. flex-wrap: wrap;
  361. margin-top: 24rpx;
  362. .grid {
  363. width: 50%;
  364. // min-height: 128rpx !important;
  365. padding-left: 10rpx;
  366. &:nth-child(odd){
  367. border-bottom: 1rpx solid #E0E0E0;
  368. border-right: 1rpx solid #E0E0E0;
  369. }
  370. &:nth-child(even){
  371. border-bottom: 1rpx solid #E0E0E0;
  372. // border-right: 1rpx solid #E0E0E0;
  373. }
  374. .audonum {
  375. color: #666666;
  376. text-indent: 40rpx;
  377. font-size: 28rpx;
  378. margin: 20rpx 0 18rpx;
  379. line-height: 40rpx;
  380. display: flex;
  381. align-items: center;
  382. .circle{
  383. margin-right: 12rpx;
  384. width: 20rpx;
  385. height: 20rpx;
  386. background: #FFFFFF;
  387. border-radius: 50%;
  388. border: 6rpx solid #2671E2;
  389. }
  390. }
  391. .num {
  392. color: #333333;
  393. font-size: 44rpx;
  394. font-weight: bold;
  395. margin: 18rpx 0 0;
  396. }
  397. }
  398. }
  399. }
  400. .centerfor {
  401. width: 100%;
  402. height: 686rpx;
  403. background: #FFFFFF;
  404. padding-left: 30rpx;
  405. padding-right: 30rpx;
  406. margin-top: 20rpx;
  407. .fortit {
  408. width: 100%;
  409. height: 86rpx;
  410. display: flex;
  411. .left {
  412. width: 70%;
  413. height: 100%;
  414. display: flex;
  415. align-items: center;
  416. .lefti {
  417. width: 6rpx;
  418. height: 30rpx;
  419. background: #2671E2;
  420. }
  421. .lefttext {
  422. font-size: 30rpx;
  423. font-family: PingFangSC-Semibold, PingFang SC;
  424. font-weight: 600;
  425. color: #333333;
  426. margin-left: 10rpx;
  427. }
  428. }
  429. .right {
  430. width: 30%;
  431. height: 70rpx;
  432. display: flex;
  433. font-size: 28rpx;
  434. align-items: center;
  435. margin-top: 16rpx;
  436. }
  437. .right view {
  438. width: 92rpx;
  439. height: 50rpx;
  440. text-align: center;
  441. }
  442. }
  443. }
  444. .activeclass {
  445. color: #2671E2;
  446. border-bottom: 4rpx solid #2671E2;
  447. }
  448. .tabdada {
  449. width: 100%;
  450. height: 580rpx;
  451. overflow-y: auto;
  452. padding-bottom: 20rpx;
  453. }
  454. .tabth {
  455. width: 100%;
  456. height: 40rpx;
  457. display: flex;
  458. font-size: 28rpx;
  459. line-height: 40rpx;
  460. color: #666666;
  461. margin-top: 34rpx;
  462. }
  463. .tabth>view:nth-of-type(1) {
  464. width: 10%;
  465. text-align: center;
  466. }
  467. .tabth>view:nth-of-type(2) {
  468. width: 46%;
  469. text-align: center;
  470. }
  471. .tabth>view:nth-of-type(3) {
  472. width: 22%;
  473. text-align: center;
  474. }
  475. .tabth>view:nth-of-type(4) {
  476. width: 22%;
  477. text-align: center;
  478. }
  479. .tabtd {
  480. width: 100%;
  481. height: 30rpx;
  482. display: flex;
  483. font-size: 26rpx;
  484. line-height: 30rpx;
  485. margin-top: 32rpx;
  486. }
  487. .tabtd>view:nth-of-type(1) {
  488. width: 10%;
  489. text-align: center;
  490. line-height: 30rpx;
  491. }
  492. .tabtd>view:nth-of-type(2) {
  493. width: 46%;
  494. text-align: center;
  495. color: #333333;
  496. }
  497. .tabtd>view:nth-of-type(3) {
  498. width: 22%;
  499. text-align: center;
  500. color: #333333;
  501. }
  502. .tabtd>view:nth-of-type(4) {
  503. width: 22%;
  504. text-align: center;
  505. color: #2671E2;
  506. }
  507. .ranking {
  508. width: 44rpx;
  509. height: 44rpx;
  510. }
  511. .ranking1 {
  512. width: 40rpx;
  513. height: 40rpx;
  514. background: #E5F0FF;
  515. color: #333;
  516. font-size: 24rpx;
  517. text-align: center;
  518. line-height: 40rpx;
  519. border-radius: 50%;
  520. margin: 0 auto;
  521. }
  522. .tabech {
  523. width: 100%;
  524. height: 600rpx;
  525. }
  526. </style>