選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Theteamcompared.vue 27 KiB

3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
3年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943
  1. <template>
  2. <view class="box">
  3. <view class="boxtittab">
  4. <view class="tabbox">
  5. <view :class="{ activecllasscet: activeTotal == 4 }" @click="tabtimetap(4)">近七天</view>
  6. </view>
  7. <view class="tabbox">
  8. <view :class="{ activecllasscet: activeTotal == 5 }" @click="tabtimetap(5)">近15天</view>
  9. </view>
  10. <view class="tabbox">
  11. <view :class="{ activecllasscet: activeTotal == 6 }" @click="tabtimetap(6)">近30天</view>
  12. </view>
  13. <view class="tabbox">
  14. <view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view>
  15. </view>
  16. </view>
  17. <view class="timepick">
  18. <view class="timepicktime" @click="chiocStaff(0)">
  19. <view>{{staff1.label}}</view>
  20. <view>
  21. <image class="Underimg" src="../../../static/images/Underimg.png" mode=""></image>
  22. </view>
  23. </view>
  24. <view class="timepickpick" v-if="staff1.value">
  25. <view @click="checkboxChange()" style="width: 40rpx;height:40rpx;border: 1rpx solid #E0E0E0;">
  26. <image v-if="timepickpickisshow" style="width: 40rpx;height: 40rpx;" src="../../../static/images/xuanzhong.png" mode=""></image>
  27. </view>
  28. <view style="font-size:26rpx;text-indent: 12rpx;">对比</view>
  29. </view>
  30. <view class="timepicktime" v-if="timepickpickisshow" @click="chiocStaff(1)">
  31. <view>{{staff2.label}}</view>
  32. <view>
  33. <image class="Underimg" src="../../../static/images/Underimg.png" mode=""></image>
  34. </view>
  35. </view>
  36. </view>
  37. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  38. <view class="single">
  39. <view class="title">
  40. <view class="title1" style="flex: 1;">接待量</view>
  41. <view class="title3" style="flex: 1;">
  42. <view class="title3-box" @click="tabtimetap1(0)">
  43. <view style="height: 42rpx;" :class="{ activecltab: eharTab.active1 == 0 }">排名</view>
  44. </view>
  45. <view class="title3-box" @click="tabtimetap1(1)">
  46. <view style="height: 42rpx;" :class="{ activecltab: eharTab.active1 == 1 }">趋势</view>
  47. </view>
  48. <!-- <view class="title3-box">
  49. <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 2 }">表格</view>
  50. </view> -->
  51. </view>
  52. </view>
  53. <view class="hejibox">
  54. <view class="heji">{{!staff1.value?'团队':staff1.label}}:{{newTeam1||0}}</view>
  55. <view class="heji">{{!staff2.value?'均值':staff2.label}}:{{newAvg1||0}}</view>
  56. </view>
  57. <view class="" v-if=" eharTab.active1 == 1 ">
  58. <view class="danwei">来访(人)</view>
  59. <view class="uchaserbox">
  60. <qiun-data-charts
  61. type="line"
  62. :chartData="lineOptsect1"
  63. background="none"
  64. :ontouch="true"
  65. canvasId="wangxiaohuaerlingeryilingwuyibbb"
  66. :canvas2d="true"
  67. />
  68. </view>
  69. </view>
  70. <view class="jindu" v-if=" eharTab.active1 == 0 ">
  71. <view class="jindu-box" v-for="(item,index) in newlisttabinfo1" :key="index">
  72. <view class="jindu-boxche">
  73. <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
  74. <view style="width: 440rpx;margin-left: 10rpx;">
  75. <u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl"></u-line-progress>
  76. </view>
  77. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  83. <view class="single">
  84. <view class="title">
  85. <view class="title1" style="flex: 1;">接待时长</view>
  86. <view class="title3" style="flex: 1;">
  87. <view class="title3-box" @click="tabtimetap2(0)">
  88. <view style="height: 42rpx;" :class="{ activecltab: eharTab.active2 == 0 }">排名</view>
  89. </view>
  90. <view class="title3-box" @click="tabtimetap2(1)">
  91. <view style="height: 42rpx;" :class="{ activecltab: eharTab.active2 == 1 }">趋势</view>
  92. </view>
  93. <!-- <view class="title3-box">
  94. <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 2 }">表格</view>
  95. </view> -->
  96. </view>
  97. </view>
  98. <view class="hejibox">
  99. <view class="heji">{{!staff1.value?'团队':staff1.label}}:{{newTeam2||0}}</view>
  100. <view class="heji">{{!staff2.value?'均值':staff2.label}}:{{newAvg2||0}}</view>
  101. </view>
  102. <view class="" v-if=" eharTab.active2 == 1 ">
  103. <view class="danwei">来访(人)</view>
  104. <view class="uchaserbox">
  105. <qiun-data-charts
  106. type="line"
  107. :chartData="lineOptsect2"
  108. background="none"
  109. :ontouch="true"
  110. canvasId="wangxiaohuaerlingeryilingwuyibb"
  111. :canvas2d="true"
  112. />
  113. </view>
  114. </view>
  115. <view class="jindu" v-if=" eharTab.active2 == 0 ">
  116. <view class="jindu-box" v-for="(item,index) in newlisttabinfo2" :key="index">
  117. <view class="jindu-boxche">
  118. <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
  119. <view style="width: 440rpx;margin-left: 10rpx;">
  120. <u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl"></u-line-progress>
  121. </view>
  122. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  128. <view class="single">
  129. <view class="title">
  130. <view class="title1" style="flex: 1;">销奖执行率</view>
  131. <view class="title3" style="flex: 1;">
  132. <view class="title3-box" @click="tabtimetap3(0)">
  133. <view style="height: 42rpx;" :class="{ activecltab: eharTab.active3 == 0 }">排名</view>
  134. </view>
  135. <view class="title3-box" @click="tabtimetap3(1)">
  136. <view style="height: 42rpx;" :class="{ activecltab: eharTab.active3 == 1 }">趋势</view>
  137. </view>
  138. <!-- <view class="title3-box">
  139. <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 2 }">表格</view>
  140. </view> -->
  141. </view>
  142. </view>
  143. <view class="hejibox">
  144. <view class="heji">{{!staff1.value?'团队':staff1.label}}:{{newTeam3||0}}</view>
  145. <view class="heji">{{!staff2.value?'均值':staff2.label}}:{{newAvg3||0}}</view>
  146. </view>
  147. <view class="" v-if=" eharTab.active3 == 1 ">
  148. <view class="danwei">来访(人)</view>
  149. <view class="uchaserbox">
  150. <qiun-data-charts
  151. type="line"
  152. :chartData="lineOptsect4"
  153. background="none"
  154. :ontouch="true"
  155. canvasId="wangxiaohuaerlingeryilingwuyib"
  156. :canvas2d="true"
  157. />
  158. </view>
  159. </view>
  160. <view class="jindu" v-if=" eharTab.active3 == 0 ">
  161. <view class="jindu-box" v-for="(item,index) in newlisttabinfo3" :key="index">
  162. <view class="jindu-boxche">
  163. <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
  164. <view style="width: 440rpx;margin-left: 10rpx;">
  165. <u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl"></u-line-progress>
  166. </view>
  167. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
  168. </view>
  169. </view>
  170. </view>
  171. </view>
  172. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  173. <!-- <view class="single">
  174. <view class="title">
  175. <view class="title1" style="flex: 1;">顾问排名(TOP10)</view>
  176. <view class="title3" style="flex: 1;">
  177. <view class="title3-box">
  178. <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">执行率</view>
  179. </view>
  180. <view class="title3-box">
  181. <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 1 }">得分</view>
  182. </view>
  183. </view>
  184. </view>
  185. <view class="hejibox">
  186. <view class="heji">合计:50</view>
  187. <view class="heji">均值:25</view>
  188. </view>
  189. <view class="jindu">
  190. <view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index">
  191. <view class="jindu-boxche">
  192. <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
  193. <view style="width: 440rpx;margin-left: 10rpx;">
  194. <u-line-progress height="24" :show-percent="false" active-color="#9B6BDF" :percent="item.zxl"></u-line-progress>
  195. </view>
  196. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
  197. </view>
  198. </view>
  199. </view>
  200. </view> -->
  201. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  202. <view class="single">
  203. <view class="title" style="padding-right: 30rpx;">
  204. <view class="title1" style="flex: 1;">违禁能力(TOP10)</view>
  205. <view class="title2" style="flex: 1;justify-content: flex-end;" @click="goTeam">
  206. <view class="title2-che">楼盘
  207. <image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
  208. </view>
  209. </view>
  210. </view>
  211. <view class="hejibox">
  212. <view class="heji">合计:50</view>
  213. <view class="heji">均值:25</view>
  214. </view>
  215. <view class="uchaserbox">
  216. <qiun-data-charts
  217. type="radar"
  218. :chartData="chartData"
  219. :canvas2d="true"
  220. canvasId="wangxiaohuaerlingeryilingwuyib88"
  221. background="none"
  222. />
  223. </view>
  224. </view>
  225. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  226. <view class="single">
  227. <view class="title">
  228. <view class="title1" style="flex: 1;">禁忌执行率</view>
  229. <view class="title3" style="flex: 1;">
  230. <view class="title3-box" @click="tabtimetap4(0)">
  231. <view style="height: 42rpx;" :class="{ activecltab: eharTab.active4 == 0 }">排名</view>
  232. </view>
  233. <view class="title3-box" @click="tabtimetap4(1)">
  234. <view style="height: 42rpx;" :class="{ activecltab: eharTab.active4 == 1 }">趋势</view>
  235. </view>
  236. <!-- <view class="title3-box">
  237. <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 2 }">表格</view>
  238. </view> -->
  239. </view>
  240. </view>
  241. <view class="hejibox">
  242. <view class="heji">{{!staff1.value?'团队':staff1.label}}:{{newTeam4||0}}</view>
  243. <view class="heji">{{!staff2.value?'均值':staff2.label}}:{{newAvg4||0}}</view>
  244. </view>
  245. <view class="" v-if=" eharTab.active4 == 1 ">
  246. <view class="danwei">来访(人)</view>
  247. <view class="uchaserbox">
  248. <qiun-data-charts
  249. type="line"
  250. :chartData="lineOptsect4"
  251. background="none"
  252. :ontouch="true"
  253. canvasId="wangxiaohuaerlingeryilingwuyi"
  254. :canvas2d="true"
  255. />
  256. </view>
  257. </view>
  258. <view class="jindu" v-if=" eharTab.active4 == 0 ">
  259. <view class="jindu-box" v-for="(item,index) in newlisttabinfo4" :key="index">
  260. <view class="jindu-boxche">
  261. <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
  262. <view style="width: 440rpx;margin-left: 10rpx;">
  263. <u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl"></u-line-progress>
  264. </view>
  265. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
  266. </view>
  267. </view>
  268. </view>
  269. </view>
  270. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  271. <view class="single">
  272. <view class="title" style="padding-right: 30rpx;">
  273. <view class="title1" style="flex: 1;">违禁能力(TOP10)</view>
  274. <view class="title2" style="flex: 1;justify-content: flex-end;">
  275. <view class="title2-che">楼盘
  276. <image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
  277. </view>
  278. </view>
  279. </view>
  280. <view class="hejibox">
  281. <view class="heji">合计:50</view>
  282. <view class="heji">均值:25</view>
  283. </view>
  284. <view class="uchaserbox">
  285. <qiun-data-charts
  286. type="radar"
  287. :chartData="chartData"
  288. :canvas2d="true"
  289. canvasId="wangxiaohuaerlingeryilingwuyib89"
  290. background="none"
  291. />
  292. </view>
  293. </view>
  294. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  295. <!-- 选择部门的选择框 -->
  296. <u-select v-model="staffShow" :list="staffList" @confirm="staffSelectCallback" :default-value='selindex'></u-select>
  297. <u-select v-model="staffShow1" :list="staffList1" @confirm="staffSelectCallback" :default-value='selindex'></u-select>
  298. </view>
  299. </template>
  300. <script>
  301. var app = getApp();
  302. var util = require("../../../utils/util.js");
  303. var config = require("../../../config");
  304. export default {
  305. data() {
  306. return {
  307. activeTotal: 4,
  308. eharTab:{
  309. active1: 0,
  310. active2:0,
  311. active3:0,
  312. active4:0,
  313. },
  314. bocindex:0,
  315. timepickpickisshow:false,
  316. totalTimeShow: false,
  317. // 楼盘id
  318. houseId:'',
  319. staffList:[],
  320. staffList1:[],
  321. staffShow:false,
  322. staffShow1:false,
  323. staff1:{
  324. value:'',
  325. label:''
  326. },
  327. staff2:{
  328. value:'',
  329. label:'平均'
  330. },
  331. lastStartDate:'',
  332. lastEndDate :'',
  333. selindex:[0],
  334. choseStaffFlag:false,
  335. lineOptsect1:{
  336. "categories": ["2016","2017","2018","2019","2020","2021"],
  337. "series": [
  338. {
  339. "name": "成交量1",
  340. "data": [35,8,25,37,4,20]
  341. },
  342. {
  343. "name": "成交量2",
  344. "data": [40,18,45,44,10,60]
  345. }
  346. ]
  347. },
  348. lineOptsect2:{
  349. "categories": ["2016","2017","2018","2019","2020","2021"],
  350. "series": [
  351. {
  352. "name": "成交量1",
  353. "data": [35,8,25,37,4,20]
  354. },
  355. {
  356. "name": "成交量2",
  357. "data": [40,18,45,44,10,60]
  358. }
  359. ]
  360. },
  361. lineOptsect3:{
  362. "categories": ["2016","2017","2018","2019","2020","2021"],
  363. "series": [
  364. {
  365. "name": "成交量1",
  366. "data": [35,8,25,37,4,20]
  367. },
  368. {
  369. "name": "成交量2",
  370. "data": [40,18,45,44,10,60]
  371. }
  372. ]
  373. },
  374. lineOptsect4:{
  375. "categories": ["2016","2017","2018","2019","2020","2021"],
  376. "series": [
  377. {
  378. "name": "成交量1",
  379. "data": [35,8,25,37,4,20]
  380. },
  381. {
  382. "name": "成交量2",
  383. "data": [40,18,45,44,10,60]
  384. }
  385. ]
  386. },
  387. newlisttabinfo1:[
  388. {name:'接待量',zxl:'10'},
  389. {name:'平均执行率',zxl:'50'},
  390. {name:'接待客户',zxl:'80'},
  391. ],
  392. newlisttabinfo2:[
  393. {name:'接待量',zxl:'10'},
  394. {name:'平均执行率',zxl:'50'},
  395. {name:'接待客户',zxl:'80'},
  396. ],
  397. newlisttabinfo3:[
  398. {name:'接待量',zxl:'10'},
  399. {name:'平均执行率',zxl:'50'},
  400. {name:'接待客户',zxl:'80'},
  401. ],
  402. newlisttabinfo4:[
  403. {name:'接待量',zxl:'10'},
  404. {name:'平均执行率',zxl:'50'},
  405. {name:'接待客户',zxl:'80'},
  406. ],
  407. newTeam1:'',
  408. newAvg1:'',
  409. newTeam2:'',
  410. newAvg2:'',
  411. newTeam3:'',
  412. newAvg3:'',
  413. newTeam4:'',
  414. newAvg4:'',
  415. chartData:{
  416. "categories": ["维度1","维度2","维度3","维度4","维度5","维度6"],
  417. "series": [
  418. {
  419. "name": "成交量",
  420. "data": [90,110,165,195,187,172]
  421. }
  422. ]
  423. },
  424. chartData2:{
  425. "categories": ["维度1","维度2","维度3","维度4","维度5","维度6"],
  426. "series": [
  427. {
  428. "name": "成交量",
  429. "data": [90,110,165,195,187,172]
  430. }
  431. ]
  432. }
  433. };
  434. },
  435. onLoad() {
  436. // 获取楼盘id
  437. this.houseId = uni.getStorageSync('buildingID').id;
  438. // this.buildingname = uni.getStorageSync('buildingID').name;
  439. // 请求接口获取所有置业顾问员工的列表
  440. this.getSectionList()
  441. },
  442. methods: {
  443. //是否对比
  444. checkboxChange(){
  445. this.timepickpickisshow=!this.timepickpickisshow;
  446. this.staff2.label='平均'
  447. this.staff2.value=''
  448. // this.getreception()
  449. // this.getRecordList()
  450. // this.getAwardList()
  451. },
  452. // 获取部门列表
  453. getSectionList(){
  454. this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId',{houseId:this.houseId})
  455. .then(res=>{
  456. // console.log(res,'123')
  457. this.staffList=[]
  458. this.staffList1=[]
  459. res.map(item=>{
  460. let obj={}
  461. obj.value=item.deptId
  462. obj.label=item.deptName
  463. this.staffList.push(obj)
  464. })
  465. this.staffList1=[...this.staffList]
  466. this.staffList.unshift({
  467. value:'',
  468. label:'全部'
  469. })
  470. this.staffList1.unshift({
  471. value:'',
  472. label:'平均'
  473. })
  474. this.staff1=this.staffList[0]
  475. // 团队对比接待量
  476. this.receptionCountList(0,1)
  477. })
  478. },
  479. // 点击部门对比
  480. chiocStaff(idx){
  481. if(idx==0){
  482. // 当选择了第一个的时候
  483. this.choseStaffFlag=false
  484. this.staffShow=true
  485. }else{
  486. this.choseStaffFlag=true
  487. this.staffShow1=true
  488. }
  489. },
  490. //时间切换
  491. tabtimetap(index) {
  492. if (index == 3) {
  493. this.totalTimeShow = true;
  494. } else {
  495. this.activeTotal = index;
  496. this.lastEndDate=''
  497. this.lastStartDate=''
  498. // 获取数据
  499. // this.getreception()
  500. // this.getRecordList()
  501. // this.getAwardList()
  502. }
  503. },
  504. // 接待量
  505. tabtimetap1(idx){
  506. this.eharTab.active1=idx
  507. // 调用方法
  508. this.receptionCountList(idx,1)
  509. // this.getRecordList()
  510. },
  511. // 接待时长
  512. tabtimetap2(idx){
  513. this.eharTab.active2=idx
  514. console.log(2,idx)
  515. // 调用方法
  516. // this.getRecordList()
  517. },
  518. tabtimetap3(idx){
  519. this.eharTab.active3=idx
  520. console.log(3,idx)
  521. // 调用方法
  522. // this.getRecordList()
  523. },
  524. tabtimetap4(idx){
  525. console.log(4,idx)
  526. this.eharTab.active4=idx
  527. // 调用方法
  528. // this.getRecordList()
  529. },
  530. //自定义时间
  531. totalTimeChange(e) {
  532. console.log(e.startDate, e.endDate)
  533. this.activeTotal=3;
  534. this.lastEndDate=e.endDate
  535. this.lastStartDate=e.startDate
  536. // 获取数据
  537. // this.getreception()
  538. // this.getRecordList()
  539. // this.getAwardList()
  540. },
  541. //指标执行率分析tab
  542. tapspagek2(index) {
  543. this.bocindex = index;
  544. },
  545. //集团对比
  546. Groupcontrast(){
  547. uni.navigateTo({
  548. url: '/pages/center/Piabodata/Groupcontrast'
  549. });
  550. },
  551. // 去选择团队
  552. goTeam(){
  553. uni.navigateTo({
  554. url:'/pages/center/Piabodata/selectTeam'
  555. })
  556. },
  557. staffSelectCallback(e){
  558. if(this.choseStaffFlag){
  559. // 第二个客户
  560. // console.log(e,'第二个')
  561. this.staff2=e[0]
  562. }else{
  563. // 第一个客户
  564. // console.log(e,'第一个')
  565. // 当选择全部时
  566. if(!e.value){
  567. this.timepickpickisshow=false
  568. this.staff2.label='平均'
  569. this.staff2.value=''
  570. }
  571. this.staff1=e[0]
  572. }
  573. if(this.staff1.label==this.staff2.label){
  574. uni.showToast({
  575. title:'请勿选择重复',
  576. icon:'none'
  577. })
  578. this.staff2.label='请选择'
  579. // this.staff2.label='平均'
  580. // this.staff2.value=''
  581. return
  582. }else{
  583. // 获取数据
  584. // this.getreception()
  585. // this.getRecordList()
  586. // this.getAwardList()
  587. }
  588. },
  589. // 团队对比接待量
  590. // receptionCountList(idx){
  591. // this.$u.post('/cusLvStatistics/teamAnalysisReception',{
  592. // // userA:this.staff1.value,
  593. // // userB:this.staff2.value,
  594. // deptIds:[this.staff1.value,this.staff2.value].filter(item=>item).join(','),
  595. // showRank:idx,
  596. // houseId:this.houseId,
  597. // timeType:this.lastEndDate?null:this.activeTotal+'',
  598. // lastEndDate:this.lastEndDate,
  599. // lastStartDate:this.lastStartDate
  600. // })
  601. // .then(res=>{
  602. // // console.log(res)
  603. // let result=res.result
  604. // this.newTeam=res.avg[0]
  605. // this.newAvg=res.avg[1]
  606. // if(idx==0){
  607. // // 当选择的是牌名时
  608. // // 处理数据
  609. // // 先处理牌名数据,需要进行判断全部还是单个
  610. // // 当为全部时
  611. // this.newlisttabinfo=[]
  612. // // 当选择全部时
  613. // if(!this.staff1.value&&!this.staff2.value){
  614. // // console.log(1)
  615. // result[0].map(item=>{
  616. // let obj={}
  617. // obj.name=item.deptName
  618. // obj.zxl=item.receptionCount
  619. // this.newlisttabinfo.push(obj)
  620. // })
  621. // }
  622. // // 当选择只有一个时
  623. // else if(this.staff1.value&&!this.staff2.value){
  624. // // console.log(2)
  625. // result[0].map(item=>{
  626. // let obj={}
  627. // obj.name=item.deptName
  628. // obj.zxl=item.receptionCount
  629. // this.newlisttabinfo.push(obj)
  630. // })
  631. // // 判断是否显示平均
  632. // // 如果显示对比
  633. // if(this.timepickpickisshow){
  634. // result[1].map(item=>{
  635. // let obj={}
  636. // obj.name='平均'
  637. // obj.zxl=item.receptionCount
  638. // this.newlisttabinfo.push(obj)
  639. // })
  640. // }
  641. // }else{
  642. // // console.log(3)
  643. // // 当两个都选择的时候
  644. // result[0].map(item=>{
  645. // let obj={}
  646. // obj.name=item.deptName
  647. // obj.zxl=item.receptionCount
  648. // this.newlisttabinfo.push(obj)
  649. // })
  650. // result[1].map(item=>{
  651. // let obj={}
  652. // obj.name=item.deptName
  653. // obj.zxl=item.receptionCount
  654. // this.newlisttabinfo.push(obj)
  655. // })
  656. // }
  657. // }else{
  658. // // 当选择趋势时
  659. // // this.lineOptsect={
  660. // // categories:[],
  661. // // series:[]
  662. // // }
  663. // let allobj={
  664. // categories:[],
  665. // series:[]
  666. // }
  667. // // 先处理时间
  668. // // 当选择全部时
  669. // if(!this.staff1.value&&!this.staff2.value){
  670. // // console.log(1)
  671. // result.map((item,idx)=>{
  672. // let obj={}
  673. // obj.name=item[0].deptName
  674. // obj.data=[]
  675. // item.map(item1=>{
  676. // // 时间的处理
  677. // if(idx==0){
  678. // allobj.categories.push(item1.statDate.slice(5,10))
  679. // }
  680. // obj.data.push(item1.receptionCount)
  681. // })
  682. // allobj.series.push(obj)
  683. // })
  684. // }
  685. // // 当选择只有一个时
  686. // else if(this.staff1.value&&!this.staff2.value){
  687. // // console.log(2)
  688. // let obj={}
  689. // obj.data=[]
  690. // obj.name=result[0][0].deptName
  691. // result[0].map(item=>{
  692. // allobj.categories.push(item.statDate.slice(5,10))
  693. // obj.data.push(item.receptionCount)
  694. // })
  695. // allobj.series.push(obj)
  696. // // 判断是否显示平均
  697. // // 如果显示对比
  698. // if(this.timepickpickisshow){
  699. // let obj={}
  700. // obj.data=[]
  701. // obj.name='平均'
  702. // result[1].map(item=>{
  703. // obj.data.push(item.receptionCount)
  704. // })
  705. // allobj.series.push(obj)
  706. // }
  707. // }else{
  708. // // console.log(3)
  709. // // 当两个都选择的时候
  710. // let obj={}
  711. // let obj1={}
  712. // obj.data=[]
  713. // obj1.data=[]
  714. // obj.name=result[0][0].deptName
  715. // obj1.name=result[1][0].deptName
  716. // result[0].map(item=>{
  717. // allobj.categories.push(item.statDate.slice(5,10))
  718. // obj.data.push(item.receptionCount)
  719. // })
  720. // result[1].map(item=>{
  721. // obj1.data.push(item.receptionCount)
  722. // })
  723. // allobj.series.push(obj)
  724. // allobj.series.push(obj1)
  725. // }
  726. // this.lineOptsect=allobj
  727. // }
  728. // })
  729. // },
  730. // 接待时长
  731. receptionCountList(idx,index){
  732. this.$u.post('/cusLvStatistics/teamAnalysisReception',{
  733. // userA:this.staff1.value,
  734. // userB:this.staff2.value,
  735. deptIds:[this.staff1.value,this.staff2.value].filter(item=>item).join(','),
  736. showRank:idx,
  737. houseId:this.houseId,
  738. timeType:this.lastEndDate?null:this.activeTotal+'',
  739. lastEndDate:this.lastEndDate,
  740. lastStartDate:this.lastStartDate
  741. })
  742. .then(res=>{
  743. // console.log(res)
  744. let result=res.result
  745. this['newTeam'+index]=res.avg[0]
  746. this['newAvg'+index]=res.avg[1]
  747. if(idx==0){
  748. // 当选择的是牌名时
  749. // 处理数据
  750. // 先处理牌名数据,需要进行判断全部还是单个
  751. // 当为全部时
  752. this['newlisttabinfo'+index]=[]
  753. // 当选择全部时
  754. if(!this.staff1.value&&!this.staff2.value){
  755. // console.log(1)
  756. result[0].map(item=>{
  757. let obj={}
  758. obj.name=item.deptName
  759. obj.zxl=item.receptionCount
  760. this['newlisttabinfo'+index].push(obj)
  761. })
  762. }
  763. // 当选择只有一个时
  764. else if(this.staff1.value&&!this.staff2.value){
  765. // console.log(2)
  766. result[0].map(item=>{
  767. let obj={}
  768. obj.name=item.deptName
  769. obj.zxl=item.receptionCount
  770. this['newlisttabinfo'+index].push(obj)
  771. })
  772. // 判断是否显示平均
  773. // 如果显示对比
  774. if(this.timepickpickisshow){
  775. result[1].map(item=>{
  776. let obj={}
  777. obj.name='平均'
  778. obj.zxl=item.receptionCount
  779. this['newlisttabinfo'+index].push(obj)
  780. })
  781. }
  782. }else{
  783. // console.log(3)
  784. // 当两个都选择的时候
  785. result[0].map(item=>{
  786. let obj={}
  787. obj.name=item.deptName
  788. obj.zxl=item.receptionCount
  789. this['newlisttabinfo'+index].push(obj)
  790. })
  791. result[1].map(item=>{
  792. let obj={}
  793. obj.name=item.deptName
  794. obj.zxl=item.receptionCount
  795. this['newlisttabinfo'+index].push(obj)
  796. })
  797. }
  798. }else{
  799. // 当选择趋势时
  800. this['lineOptsect'+index]={}
  801. // this.lineOptsect={
  802. // categories:[],
  803. // series:[]
  804. // }
  805. let allobj={
  806. categories:[],
  807. series:[]
  808. }
  809. // 先处理时间
  810. // 当选择全部时
  811. if(!this.staff1.value&&!this.staff2.value){
  812. // console.log(1)
  813. result.map((item,idx)=>{
  814. let obj={}
  815. obj.name=item[0].deptName
  816. obj.data=[]
  817. item.map(item1=>{
  818. // 时间的处理
  819. if(idx==0){
  820. allobj.categories.push(item1.statDate.slice(5,10))
  821. }
  822. obj.data.push(item1.receptionCount)
  823. })
  824. allobj.series.push(obj)
  825. })
  826. }
  827. // 当选择只有一个时
  828. else if(this.staff1.value&&!this.staff2.value){
  829. // console.log(2)
  830. let obj={}
  831. obj.data=[]
  832. obj.name=result[0][0].deptName
  833. result[0].map(item=>{
  834. allobj.categories.push(item.statDate.slice(5,10))
  835. obj.data.push(item.receptionCount)
  836. })
  837. allobj.series.push(obj)
  838. // 判断是否显示平均
  839. // 如果显示对比
  840. if(this.timepickpickisshow){
  841. let obj={}
  842. obj.data=[]
  843. obj.name='平均'
  844. result[1].map(item=>{
  845. obj.data.push(item.receptionCount)
  846. })
  847. allobj.series.push(obj)
  848. }
  849. }else{
  850. // console.log(3)
  851. // 当两个都选择的时候
  852. let obj={}
  853. let obj1={}
  854. obj.data=[]
  855. obj1.data=[]
  856. obj.name=result[0][0].deptName
  857. obj1.name=result[1][0].deptName
  858. result[0].map(item=>{
  859. allobj.categories.push(item.statDate.slice(5,10))
  860. obj.data.push(item.receptionCount)
  861. })
  862. result[1].map(item=>{
  863. obj1.data.push(item.receptionCount)
  864. })
  865. allobj.series.push(obj)
  866. allobj.series.push(obj1)
  867. }
  868. console.log(allobj)
  869. // return
  870. this['lineOptsect'+index].series=allobj.series
  871. this['lineOptsect'+index].categories=allobj.categories
  872. }
  873. })
  874. },
  875. }
  876. };
  877. </script>
  878. <style lang="scss" scoped>
  879. .box {
  880. width: 100%;
  881. height: 100%;
  882. background: #FAFAFA;
  883. padding-bottom: 60rpx;
  884. }
  885. // 对比时间切换
  886. .timepick{
  887. width: 100%;
  888. height: 90rpx;
  889. display: flex;
  890. align-items: center;
  891. background: #FAFAFA;
  892. }
  893. .timepicktime{
  894. width: 260rpx;
  895. height: 50rpx;
  896. border: 1rpx solid #E0E0E0;
  897. margin-left: 30rpx;
  898. display: flex;
  899. background: #FFFFFF;
  900. }
  901. .timepicktime>view:nth-of-type(1){
  902. width: 210rpx;
  903. height: 100%;
  904. line-height: 50rpx;
  905. font-size: 26rpx;
  906. font-weight: 400;
  907. text-align: center;
  908. }
  909. .timepicktime>view:nth-of-type(2){
  910. width: 50rpx;
  911. height: 100%;
  912. border-left: 1px solid #E0E0E0;
  913. }
  914. .timepickpick{
  915. width: 110rpx;
  916. height: 50rpx;
  917. margin-left: 30rpx;
  918. display: flex;
  919. align-items: center;
  920. }
  921. .Underimg{
  922. width: 50rpx;
  923. height:50rpx;
  924. margin-top: -2rpx;
  925. }
  926. </style>