AI销管
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

Employeesstatistics.vue 20 KiB

2 anni fa
1 anno fa
2 anni fa
1 anno fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
1 anno fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
1 anno fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
1 anno fa
2 anni fa
2 anni fa
2 anni fa
1 anno fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
1 anno fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
1 anno fa
1 anno fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
1 anno fa
2 anni fa
2 anni fa
1 anno fa
2 anni fa
1 anno fa
2 anni fa
1 anno fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
1 anno fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. <template>
  2. <view class="box">
  3. <view class="boxtittabs">
  4. <div class="items" @tap="screenShow = true">{{ showTimeText }}
  5. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
  6. </div>
  7. <div class="items" @tap="showTemplate = true">{{ showBeText }}
  8. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
  9. </div>
  10. </view>
  11. <!-- 销讲业务 -->
  12. <u-select :mask-close-able="false" label-name="templateName" value-name="id" v-model="showTemplate"
  13. mode="single-column" :list="templateList" @cancel="templateCancel" @confirm="templateConfirm"></u-select>
  14. <view class="single">
  15. <view class="title">
  16. <view class="title1" style="flex: 1;">接待量排名(TOP10)</view>
  17. </view>
  18. <view class="hejisan">
  19. <view class="sanbox1">
  20. <view class="text1-2">{{newlisttabinfo1.total}}</view>
  21. <view class="text1-1">合计接待次数</view>
  22. </view>
  23. <view class="sanbox1">
  24. <view class="text1-2">{{newlisttabinfo1.count}}</view>
  25. <view class="text1-1">顾问人数</view>
  26. </view>
  27. <view class="sanbox1">
  28. <view class="text1-2">{{newlisttabinfo1.avg}}</view>
  29. <view class="text1-1">人均接待次数</view>
  30. </view>
  31. </view>
  32. <view class="jindu" style="margin-top: 20rpx;">
  33. <view v-if="newlisttabinfo1.result.length" class="jindu-box"
  34. v-for="(item,index) in newlisttabinfo1.result" :key="index">
  35. <view class="jindu-boxche">
  36. <view class="jindu-name u-flex" style='width: 170rpx' v-if="item.name">
  37. <image v-if="index==0" class="sort-img" src="/static/images/top1.png" mode="" />
  38. <image v-if="index==1" class="sort-img" src="/static/images/top2.png" mode="" />
  39. <image v-if="index==2" class="sort-img" src="/static/images/top3.png" mode="" />
  40. <view class="sort-number" v-if="index>2">{{index+1}}</view>
  41. {{item.name.substring(0,4)}}
  42. </view>
  43. <view class="progress-cus">
  44. <view class="color1" v-if="index==0" :style="'width:'+ item.zxl||0 + '%'"></view>
  45. <view class="color2" v-if="index==1" :style="'width:'+ getPercent(item.zxl,1) + '%'"></view>
  46. <view class="color3" v-if="index==2" :style="'width:'+ getPercent(item.zxl,1) + '%'"></view>
  47. <view class="color4" v-if="index>2" :style="'width:'+ getPercent(item.zxl,1) + '%'"></view>
  48. </view>
  49. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}次</view>
  50. </view>
  51. </view>
  52. <view v-if="newlisttabinfo1.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
  53. 暂无数据
  54. </view>
  55. </view>
  56. </view>
  57. <view class="single">
  58. <view class="title">
  59. <view class="title1" style="flex: 1;">平均执行率排行(TOP10)</view>
  60. </view>
  61. <view class="hejisan">
  62. <view class="sanbox1" style="width: 40%;">
  63. <view class="text1-2">{{newlisttabinfo3.count}}</view>
  64. <view class="text1-1">顾问人数</view>
  65. </view>
  66. <view class="sanbox1" style="width: 25%;">
  67. <view class="text1-2">{{newlisttabinfo3.avg}}%</view>
  68. <view class="text1-1">人均执行率</view>
  69. </view>
  70. </view>
  71. <view class="jindu" style="margin-top: 20rpx;">
  72. <view v-if="newlisttabinfo3.result.length" class="jindu-box"
  73. v-for="(item,index) in newlisttabinfo3.result" :key="index">
  74. <view class="jindu-boxche">
  75. <view class="jindu-name u-flex" style='width: 170rpx' v-if="item.name">
  76. <image v-if="index==0" class="sort-img" src="/static/images/top1.png" mode="" />
  77. <image v-if="index==1" class="sort-img" src="/static/images/top2.png" mode="" />
  78. <image v-if="index==2" class="sort-img" src="/static/images/top3.png" mode="" />
  79. <view class="sort-number" v-if="index>2">{{index+1}}</view>
  80. {{item.name.substring(0,4)}}
  81. </view>
  82. <!-- <view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view> -->
  83. <!-- <view class="progress-cus">
  84. <view class="color" :style="'width:'+ item.zxl||0 + '%'" ></view>
  85. </view> -->
  86. <view class="progress-cus">
  87. <view class="color1" v-if="index==0" :style="'width:'+ getPercent1(item.zxl) + '%'"></view>
  88. <view class="color2" v-if="index==1" :style="'width:'+ getPercent1(item.zxl) + '%'"></view>
  89. <view class="color3" v-if="index==2" :style="'width:'+ getPercent1(item.zxl) + '%'"></view>
  90. <view class="color4" v-if="index>2" :style="'width:'+ getPercent1(item.zxl) + '%'"></view>
  91. </view>
  92. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view>
  93. </view>
  94. </view>
  95. <view v-if="newlisttabinfo3.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
  96. 暂无数据
  97. </view>
  98. </view>
  99. </view>
  100. <view class="single">
  101. <view class="title">
  102. <view class="title1" style="flex: 1;">录音时长(TOP10)</view>
  103. </view>
  104. <view class="hejisan">
  105. <view class="sanbox1">
  106. <view class="text1-2">{{newlisttabinfo2.total}}</view>
  107. <view class="text1-1">合计时长/分钟</view>
  108. </view>
  109. <view class="sanbox1">
  110. <view class="text1-2">{{newlisttabinfo2.count}}</view>
  111. <view class="text1-1">顾问人数</view>
  112. </view>
  113. <view class="sanbox1">
  114. <view class="text1-2">{{newlisttabinfo2.avg}}</view>
  115. <view class="text1-1">人均录音时长/分钟</view>
  116. </view>
  117. </view>
  118. <view class="jindu" style="margin-top: 20rpx;">
  119. <view v-if="newlisttabinfo2.result.length" class="jindu-box"
  120. v-for="(item,index) in newlisttabinfo2.result" :key="index">
  121. <view class="jindu-boxche">
  122. <view class="jindu-name u-flex" style='width: 170rpx' v-if="item.name">
  123. <image v-if="index==0" class="sort-img" src="/static/images/top1.png" mode="" />
  124. <image v-if="index==1" class="sort-img" src="/static/images/top2.png" mode="" />
  125. <image v-if="index==2" class="sort-img" src="/static/images/top3.png" mode="" />
  126. <view class="sort-number" v-if="index>2">{{index+1}}</view>
  127. {{item.name.substring(0,4)}}
  128. </view>
  129. <view class="progress-cus">
  130. <view class="color1" v-if="index==0" :style="'width:'+ item.zxl||0 + '%'"></view>
  131. <view class="color2" v-if="index==1" :style="'width:'+ getPercent(item.zxl,2)+ '%'"></view>
  132. <view class="color3" v-if="index==2" :style="'width:'+ getPercent(item.zxl,2)+ '%'"></view>
  133. <view class="color4" v-if="index>2" :style="'width:'+ getPercent(item.zxl,2)+ '%'"></view>
  134. </view>
  135. <view class="jindu-zxl u-line-1">{{item.zxl==null?0:item.zxl}}分钟</view>
  136. </view>
  137. </view>
  138. <view v-if="newlisttabinfo2.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
  139. 暂无数据
  140. </view>
  141. </view>
  142. </view>
  143. <view class="single">
  144. <view class="title">
  145. <view class="title1" style="flex: 1;">违禁次数排名(TOP10)</view>
  146. </view>
  147. <view class="hejisan">
  148. <view class="sanbox1">
  149. <view class="text1-2">{{newlisttabinfo4.total}}</view>
  150. <view class="text1-1">合计次数</view>
  151. </view>
  152. <view class="sanbox1">
  153. <view class="text1-2">{{newlisttabinfo4.count}}人</view>
  154. <view class="text1-1">顾问人数</view>
  155. </view>
  156. <view class="sanbox1">
  157. <view class="text1-2">{{newlisttabinfo4.avg}}</view>
  158. <view class="text1-1">人均违禁次数</view>
  159. </view>
  160. </view>
  161. <view class="jindu" style="margin-top: 20rpx;min-height: 300rpx">
  162. <view v-if="newlisttabinfo4.result.length" class="jindu-box"
  163. v-for="(item,index) in newlisttabinfo4.result" :key="index">
  164. <view class="jindu-boxche">
  165. <view class="jindu-name u-flex" style='width: 170rpx' v-if="item.name">
  166. <image v-if="index==0" class="sort-img" src="/static/images/top1.png" mode="" />
  167. <image v-if="index==1" class="sort-img" src="/static/images/top2.png" mode="" />
  168. <image v-if="index==2" class="sort-img" src="/static/images/top3.png" mode="" />
  169. <view class="sort-number" v-if="index>2">{{index+1}}</view>
  170. {{item.name.substring(0,4)}}
  171. </view>
  172. <view class="progress-cus">
  173. <view class="color1" v-if="index==0" :style="'width:'+ item.zxl||0 + '%'"></view>
  174. <view class="color2" v-if="index==1" :style="'width:'+ getPercent(item.zxl,4)+ '%'"></view>
  175. <view class="color3" v-if="index==2" :style="'width:'+ getPercent(item.zxl,4) + '%'"></view>
  176. <view class="color4" v-if="index>2" :style="'width:'+ getPercent(item.zxl,4)+ '%'"></view>
  177. </view>
  178. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}次</view>
  179. </view>
  180. </view>
  181. <view v-if="newlisttabinfo4.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
  182. 暂无数据
  183. </view>
  184. </view>
  185. </view>
  186. <view class="single">
  187. <view class="title">
  188. <view class="title1" style="flex: 1;">接待未标顾问排名(TOP10)</view>
  189. </view>
  190. <view class="hejisan">
  191. <view class="sanbox1">
  192. <view class="text1-2">{{newlisttabinfo5.total||0}}</view>
  193. <view class="text1-1">合计</view>
  194. </view>
  195. <view class="sanbox1">
  196. <view class="text1-2">{{newlisttabinfo5.count||0}}人</view>
  197. <view class="text1-1">顾问</view>
  198. </view>
  199. <view class="sanbox1">
  200. <view class="text1-2">{{newlisttabinfo5.avg||0}}</view>
  201. <view class="text1-1">均值</view>
  202. </view>
  203. </view>
  204. <view class="jindu" style="margin-top: 20rpx;min-height: 300rpx">
  205. <view v-if="newlisttabinfo5.result.length!=0" class="jindu-box"
  206. v-for="(item,index) in newlisttabinfo5.result" :key="index">
  207. <view class="jindu-boxche">
  208. <view class="jindu-name u-flex" style='width: 170rpx' v-if="item.name">
  209. <image v-if="index==0" class="sort-img" src="/static/images/top1.png" mode="" />
  210. <image v-if="index==1" class="sort-img" src="/static/images/top2.png" mode="" />
  211. <image v-if="index==2" class="sort-img" src="/static/images/top3.png" mode="" />
  212. <view class="sort-number" v-if="index>2">{{index+1}}</view>
  213. {{item.name.substring(0,4)}}
  214. </view>
  215. <view class="progress-cus">
  216. <view class="color1" v-if="index==0" :style="'width:'+ item.zxl||0 + '%'"></view>
  217. <view class="color2" v-if="index==1" :style="'width:'+ getPercent(item.zxl,5)+ '%'"></view>
  218. <view class="color3" v-if="index==2" :style="'width:'+ getPercent(item.zxl,5) + '%'"></view>
  219. <view class="color4" v-if="index>2" :style="'width:'+ getPercent(item.zxl,5)+ '%'"></view>
  220. </view>
  221. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}次</view>
  222. </view>
  223. </view>
  224. <view v-if="newlisttabinfo5.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
  225. 暂无数据
  226. </view>
  227. </view>
  228. </view>
  229. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  230. <!-- 加载组件 -->
  231. <u-loadings v-model="LOADING"></u-loadings>
  232. <!-- 更多筛选 -->
  233. <u-popup v-model="screenShow" mode="bottom" height="368">
  234. <view class="screen">
  235. <view class="boxtittab">
  236. <view class="tabbox">
  237. <view :class="{ activecllasscet: activeTotal == 4 }" @click="tabtimetap(4, '近七天')">近七天</view>
  238. </view>
  239. <view class="tabbox">
  240. <view :class="{ activecllasscet: activeTotal == 5 }" @click="tabtimetap(5, '近15天')">近15天</view>
  241. </view>
  242. <view class="tabbox">
  243. <view :class="{ activecllasscet: activeTotal == 6 }" @click="tabtimetap(6, '近30天')">近30天</view>
  244. </view>
  245. <view class="tabbox">
  246. <view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3, '自定义')">自定义</view>
  247. </view>
  248. </view>
  249. </view>
  250. </u-popup>
  251. </view>
  252. </template>
  253. <script>
  254. var app = getApp();
  255. var util = require("../../../utils/util.js");
  256. var config = require("../../../config");
  257. export default {
  258. data() {
  259. return {
  260. activeTotal: 4,
  261. totalTimeShow: false,
  262. // 项目id
  263. houseId: '',
  264. lastEndDate: '',
  265. lastStartDate: '',
  266. newlisttabinfo1: {
  267. avg: '',
  268. count: '',
  269. total: '',
  270. result: [],
  271. },
  272. newlisttabinfo2: {
  273. avg: '',
  274. count: '',
  275. total: '',
  276. result: [],
  277. },
  278. newlisttabinfo3: {
  279. avg: '',
  280. count: '',
  281. total: '',
  282. result: [],
  283. },
  284. newlisttabinfo4: {
  285. avg: '',
  286. count: '',
  287. total: '',
  288. result: [],
  289. },
  290. newlisttabinfo5: {
  291. avg: '',
  292. count: '',
  293. total: '',
  294. result: [],
  295. },
  296. screenShow: false, // 时间筛选弹窗
  297. showTimeText: '近一周', // 展示文字
  298. showBeText: '全部业务', //
  299. templateList: [], // 销讲业务
  300. showTemplate: false, // 展示选择销讲业务弹窗
  301. marketingBusiness: '', // 选择的业务id
  302. };
  303. },
  304. onLoad() {
  305. this.LOADING = true
  306. // 获取项目id
  307. this.houseId = uni.getStorageSync('buildingID').id;
  308. this.init()
  309. this.getMarketingBusiness()
  310. },
  311. computed: {
  312. },
  313. onPullDownRefresh() {
  314. this.init()
  315. setTimeout(function() {
  316. uni.stopPullDownRefresh();
  317. }, 1000);
  318. },
  319. methods: { // 销讲业务方法
  320. templateCancel() {
  321. this.showTemplate = false;
  322. },
  323. // 确认选择销讲业务
  324. templateConfirm(e) {
  325. this.showTemplate = false;
  326. this.marketingBusiness = e[0].value
  327. this.showBeText = e[0].label
  328. this.init()
  329. },
  330. // 获取销讲业务
  331. getMarketingBusiness() {
  332. this.$u.get('/customer/marketingBusiness', {
  333. houseId: uni.getStorageSync('buildingID').id,
  334. }).then(res => {
  335. this.templateList = res
  336. this.templateList.unshift({
  337. templateName: '全部业务',
  338. id: ''
  339. })
  340. })
  341. },
  342. getPercent(num, type) {
  343. if (this.newlisttabinfo1.result && this.newlisttabinfo1.result.length && type == 1) {
  344. let index0 = this.newlisttabinfo1.result[0]
  345. let percent = num / (index0.zxl == 0 ? 1 : index0.zxl) * 100
  346. return percent.toFixed(2)
  347. } else if (this.newlisttabinfo2.result && this.newlisttabinfo2.result.length && type == 2) {
  348. let index0 = this.newlisttabinfo2.result[0]
  349. let percent = num / (index0.zxl == 0 ? 1 : index0.zxl) * 100
  350. return percent.toFixed(2)
  351. } else if (this.newlisttabinfo4.result && this.newlisttabinfo4.result.length && type == 4) {
  352. let index0 = this.newlisttabinfo4.result[0]
  353. let percent = num / (index0.zxl == 0 ? 1 : index0.zxl) * 100
  354. return percent.toFixed(2)
  355. } else if (this.newlisttabinfo5.result && this.newlisttabinfo5.result.length && type == 5) {
  356. let index0 = this.newlisttabinfo5.result[0]
  357. let percent = num / (index0.zxl == 0 ? 1 : index0.zxl) * 100
  358. return percent.toFixed(2)
  359. } else {
  360. return 0
  361. }
  362. },
  363. getPercent1(num) {
  364. return num || 0
  365. },
  366. init() {
  367. this.newlisttabinfo1 = {
  368. avg: '',
  369. count: '',
  370. total: '',
  371. result: [],
  372. },
  373. this.newlisttabinfo2 = {
  374. avg: '',
  375. count: '',
  376. total: '',
  377. result: [],
  378. },
  379. this.newlisttabinfo3 = {
  380. avg: '',
  381. count: '',
  382. total: '',
  383. result: [],
  384. },
  385. this.newlisttabinfo4 = {
  386. avg: '',
  387. count: '',
  388. total: '',
  389. result: [],
  390. }
  391. this.newlisttabinfo2 = {
  392. avg: '',
  393. count: '',
  394. total: '',
  395. result: [],
  396. }
  397. this.newlisttabinfo3 = {
  398. avg: '',
  399. count: '',
  400. total: '',
  401. result: [],
  402. }
  403. this.newlisttabinfo4 = {
  404. avg: '',
  405. count: '',
  406. total: '',
  407. result: [],
  408. }
  409. this.newlisttabinfo5 = {
  410. avg: '',
  411. count: '',
  412. total: '',
  413. result: [],
  414. }
  415. var activeTotal = 0;
  416. if (this.activeTotal == 3) {
  417. activeTotal = null;
  418. } else {
  419. activeTotal = this.activeTotal;
  420. this.lastEndDate = '';
  421. this.lastStartDate = '';
  422. }
  423. var promse = {
  424. timeType: activeTotal,
  425. lastStartDate: this.lastStartDate,
  426. lastEndDate: this.lastEndDate,
  427. houseId: this.houseId,
  428. marketingBusiness: this.marketingBusiness,
  429. }
  430. this.staffStatisticsReceptionTop10(promse)
  431. this.staffStatisticsRecordingTimTop10(promse)
  432. this.staffStatisticsExecutionRateTop10(promse)
  433. this.staffStatisticsProhibitedTop10(promse)
  434. this.staffStatisticsUnlabeledTop10(promse)
  435. },
  436. //接待量排名
  437. staffStatisticsReceptionTop10(promse) {
  438. this.$u.post('/cusLvStatistics/staffStatisticsReceptionTop10', promse).then(res => {
  439. res.result.forEach(item => {
  440. item.zxl = item.data
  441. item.name = item.accountName
  442. })
  443. res.result = this.dealData(res.result)
  444. this.newlisttabinfo1 = res;
  445. })
  446. },
  447. //录音时长
  448. staffStatisticsRecordingTimTop10(promse) {
  449. this.$u.post('/cusLvStatistics/staffStatisticsRecordingTimTop10', promse).then(res => {
  450. res.result.forEach(item => {
  451. item.zxl = item.data
  452. item.name = item.accountName
  453. })
  454. res.result = this.dealData(res.result)
  455. this.newlisttabinfo2 = res;
  456. })
  457. },
  458. //销讲
  459. staffStatisticsExecutionRateTop10(promse) {
  460. this.$u.post('/cusLvStatistics/staffStatisticsExecutionRateTop10', promse).then(res => {
  461. res.result.forEach(item => {
  462. item.zxl = item.data;
  463. item.zxl1 = item.data;
  464. item.name = item.accountName
  465. })
  466. this.newlisttabinfo3 = res;
  467. })
  468. },
  469. //j禁忌
  470. staffStatisticsProhibitedTop10(promse) {
  471. this.$u.post('/cusLvStatistics/staffStatisticsProhibitedTop10', promse).then(res => {
  472. res.result.forEach(item => {
  473. item.zxl = item.data
  474. item.name = item.accountName
  475. })
  476. res.result = this.dealData(res.result)
  477. this.newlisttabinfo4 = res;
  478. })
  479. },
  480. //未标记客户数量排名,
  481. staffStatisticsUnlabeledTop10(promse) {
  482. this.$u.post('/cusLvStatistics/staffStatisticsUnlabeledTop', promse).then(res => {
  483. this.LOADING = false
  484. res.result.forEach(item => {
  485. item.zxl = item.tagCustomer
  486. item.name = item.accountName
  487. })
  488. res.result = this.dealData(res.result)
  489. this.newlisttabinfo5 = res;
  490. }).catch(e => {
  491. this.LOADING = false
  492. })
  493. },
  494. //自定义时间
  495. totalTimeChange(e) {
  496. this.screenShow = false
  497. this.showTimeText = `${e.startDate}-${e.endDate}`
  498. this.activeTotal = 3;
  499. this.lastEndDate = e.endDate
  500. this.lastStartDate = e.startDate
  501. this.init()
  502. },
  503. //时间切换
  504. tabtimetap(index, text) {
  505. if (index == 3) {
  506. this.totalTimeShow = true;
  507. this.screenShow = false
  508. } else {
  509. this.screenShow = false
  510. this.showTimeText = text
  511. this.activeTotal = index;
  512. this.lastEndDate = '';
  513. this.lastStartDate = '';
  514. this.init()
  515. }
  516. },
  517. // 定义一个公共方法对数据进行处理
  518. dealData(arr) {
  519. // 获取最大值
  520. let num = Math.max.apply(Math, arr.map(function(o) {
  521. return o.zxl
  522. })) //结果:3
  523. arr.map(item => {
  524. item.zxl1 = Math.floor(item.zxl / num * 100)
  525. })
  526. return arr
  527. },
  528. }
  529. };
  530. </script>
  531. <style lang="scss" scoped>
  532. .boxtittabs {
  533. width: 100%;
  534. height: 92rpx;
  535. background: #FFFFFF;
  536. display: flex;
  537. align-items: center;
  538. .items {
  539. padding: 0 24rpx;
  540. width: 50%;
  541. height: 100%;
  542. display: flex;
  543. align-items: center;
  544. justify-content: center;
  545. overflow: hidden;
  546. white-space: nowrap;
  547. text-overflow: ellipsis;
  548. }
  549. }
  550. .screen {
  551. width: 100%;
  552. .boxtittab {
  553. width: 100%;
  554. flex-direction: column;
  555. border: none;
  556. .tabbox {
  557. width: 100%;
  558. }
  559. }
  560. }
  561. .box {
  562. width: 100%;
  563. height: 100%;
  564. background: #FAFAFA;
  565. }
  566. .single {
  567. padding-bottom: 20rpx;
  568. margin-top: 20rpx;
  569. }
  570. .boxtittab {
  571. position: sticky;
  572. top: var(--window-top);
  573. z-index: 999;
  574. }
  575. .hejisan {
  576. width: 92%;
  577. margin: 0 auto;
  578. display: flex;
  579. padding-top: 20rpx;
  580. padding-bottom: 20rpx;
  581. .sanbox1 {
  582. flex: 1;
  583. display: flex;
  584. flex-direction: column;
  585. justify-content: center;
  586. align-items: center;
  587. position: relative;
  588. &::after {
  589. position: absolute;
  590. content: '';
  591. width: 1rpx;
  592. height: 86rpx;
  593. background: #E0E0E0;
  594. right: 0;
  595. top: 0;
  596. }
  597. &:last-child::after {
  598. position: absolute;
  599. content: '';
  600. width: 1rpx;
  601. height: 86rpx;
  602. right: 0;
  603. top: 0;
  604. background: #fff;
  605. }
  606. }
  607. .text1-1 {
  608. font-size: 24rpx;
  609. font-family: PingFangSC-Regular, PingFang SC;
  610. font-weight: 400;
  611. color: #333333;
  612. line-height: 32rpx;
  613. }
  614. .text1-2 {
  615. color: #333333;
  616. font-size: 40rpx;
  617. line-height: 46rpx;
  618. font-family: PingFangSC-Regular, PingFang SC;
  619. margin-bottom: 10rpx;
  620. }
  621. }
  622. .jindu-name {
  623. width: 180rpx;
  624. margin-left: 15rpx;
  625. }
  626. .sort-img {
  627. width: 44rpx;
  628. height: 44rpx;
  629. margin-right: 15rpx;
  630. }
  631. .sort-number {
  632. width: 40rpx;
  633. height: 40rpx;
  634. background: #E5F0FF;
  635. border-radius: 50%;
  636. font-size: 24rpx;
  637. font-family: PingFangSC-Regular, PingFang SC;
  638. font-weight: 400;
  639. color: #333333;
  640. text-align: center;
  641. line-height: 40rpx;
  642. margin-right: 15rpx;
  643. }
  644. </style>