AI营销辅助 普强使用
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

532 satır
12 KiB

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